2012-04-12 11 views
2

私はモバイルで表示するサイトを行っていますし、エフェクトのモバイルCSSとjqueryを使用しています.iスタイルとエフェクトには以下のコードを使用しています。私はjqueryのにjqueryのモバイルとjqueryのjqueryの競合に対処する方法

http://slot.pixelass.com/ 

を使用していたが、私は上記の携帯jquery.Iは知りません含まれている場合、描画のための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> 

how to tackle jquery conflict

誰かが助けてくれるように助けてください。 ありがとうございます

+0

なぜjquery mobileだけを使用しないのですか? – Baz1nga

+0

スロットマシン用のモバイルjqueryをたくさん試しましたが、私はそれを取得しません –

+0

http://jquerymobile.com/demos/1.0a2/experiments/api-viewer/docs/jQuery.noConflict/index.htmlこれは – Baz1nga

答えて

0

jQuery.noConflict()という特定のjQuery関数があり、他のライブラリとの競合を取り除くのに役立ちます。ここにはjQuery's documentationのスニペットがあります:

<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>