嗨,我对jquery很新,并将它组合到我的asp.net工作中。
我已经阅读了你注册jquery文件的顺序,所以我把核心文件放在顶部? 我真的不明白我错在哪里:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:PlaceHolder runat="server" ID="ph">
<script src="development-bundle/ui/jquery.ui.core.js" type="text/javascript"> </script>
<script src="development-bundle/jquery-1.7.2.js" type="text/javascript"></script>
<script src="development-bundle/ui/jquery.ui.draggable.js" type="text/javascript"> </script>
<script type="text/javascript">
$(function () {
$("#draggable").draggable();
});
</script>
</asp:PlaceHolder>
<asp:Panel ID="pnl_deck_holder" runat="server">
</asp:Panel>
<div id="draggable" class="ui-widget-content">
drag me
</div>
</asp:Content>
答案 0 :(得分:1)
答案 1 :(得分:0)
它应该是这样的。首先是Jquery源文件,然后是Jquery UI。
<script src="development-bundle/jquery-1.7.2.js" type="text/javascript"></script>
<script src="development-bundle/ui/jquery.ui.core.js" type="text/javascript"></script>
<script src="development-bundle/ui/jquery.ui.draggable.js" type="text/javascript">