how to use jquery.noConflict property

后端 未结 4 818
轻奢々
轻奢々 2020-12-09 00:39

I am testing my webpage on a server using preview dns. Just realized that preview dns automatically adds mootools library towards the end of any php page. Probably for thei

4条回答
  •  清歌不尽
    2020-12-09 00:58

    Insert the following before any jquery code:

    $j = jQuery.noConflict(true); 
    

    Now you can use $j instead of $ for any jquery stuff you want to do. i.e.:

    $j("body")
    

提交回复
热议问题