jquery conflict

2019-07-19 01:08发布

In my project I am maintaining different jquery versions . so, I am getting jquery conflict please help me how to solve this problem.

2条回答
一纸荒年 Trace。
2楼-- · 2019-07-19 01:31

A simple Google search for jQuery conflict would have directed you to the API site:

http://api.jquery.com/jQuery.noConflict/

<script src='jquery-1.3.2.js'></script>
<script>
    var jq132 = jQuery.noConflict();
</script>

<script src='jquery-1.4.2.js'></script>
<script>
    var jq142 = jQuery.noConflict();
</script>
查看更多
The star\"
3楼-- · 2019-07-19 01:34

try this

<script type="text/javascript">var jQuery_1_10_2 = $.noConflict(true);</script>

<script>jQuery_1_10_2(document).ready(function(){


jQuery_1_10_2("#click_id").click(function(){
 jQuery_1_10_2("#your_id").toggle();


 });});

</script>
查看更多
登录 后发表回答