joh*_* Gu 2 jquery asp.net-mvc-3
我的视图中有以下Jquery函数: -
<script type="text/javascript">
$(document).ready(function () {
$("#album-list").mouseover(function () {
$(this).animate({ height: '+=15', width: '+=15' })
.animate({ height: '-=15', width: '-=15' });
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
我已将以下脚本添加到_layout视图: -
<script src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.14.min.js")" type="text/javascript"></script>
Run Code Online (Sandbox Code Playgroud)
但是当我导航到包含上述Jquery函数的视图时; 将引发以下错误""Microsoft JScript运行时错误:'$'"".那可能是什么问题呢?BR
您是否在内联脚本后加载脚本?必须在加载jquery后放置内联脚本.
如果是这种情况,请检查jquery脚本的位置.
| 归档时间: |
|
| 查看次数: |
7613 次 |
| 最近记录: |