-3

こんにちは、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>
4

2 に答える 2

1

jquery-1.7.2 を最初に配置し、その後に jquery.ui.core およびその他の UI コンポーネントを配置する必要があります。ただし、jquery UI を使用している場合、ダウンロード ビルダーを使用すると、通常、必要なものがすべて 1 つのファイルにバンドルされます。

于 2012-05-19T00:39:18.160 に答える
0

このようになります。最初にJqueryソースファイル、次にJqueryUI。

<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">     
于 2012-05-19T10:40:39.573 に答える