2

私はモバイルで表示するサイトを作成しており、エフェクトにはモバイルの css と jquery を使用しています。スタイルとエフェクトには以下のコードを使用しています。

<link rel="stylesheet" href="<?=base_url()?>css/jquery_01.css" /> 

 <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0-rc.2/jquery.mobile-1.1.0-rc.2.min.js"></script>

私のサイトには描画用の部分があるので、jqueryを使用しました

http://slot.pixelass.com/

しかし、上記のモバイルjqueryを含めると、描画用のjqueryが機能しませんhow to tackle jquery conflict

誰か助けてください。前もって感謝します

4

1 に答える 1

0

jQuery.noConflict()他のライブラリとの競合を取り除くために呼び出される特定のjQuery関数があります。これがjQueryのドキュメントからの抜粋です:

<script type="text/javascript">
  // This takes out the jQuery variable '$' from the global scope
  $.noConflict();
  jQuery(document).ready(function($) {
    // Code that uses jQuery's $ can follow here.
  });
  // Code that uses other library's $ can follow here.
</script>
于 2012-12-25T12:50:35.897 に答える