简体   繁体   中英

Resolving conflict between multiple jQuery files

I have multiple jquery files in my project. I am using facebox using jquery1.4.2 but i need prototype and scriptacolous scripts too. I have used jQuery.noconflict(); in my code but its not working. this is the url http://mlep.com/~avalon/wordpress/ideas-and-insights/case-studies/ .

it should be in this manner of arrangement,

  1. load other libraries and other non-jQuery scripts
  2. load jQuery library.
  3. call jQuery.noConflict.
  4. load jQuery plugins
  5. other jQuery stuff or codes..

codes like this,

<script type="text/javascript" src="http://mlep.com/~avalon/wordpress/wp-content/themes/twentyten/facebox/jquery14.js"></script> 
<script type="text/javascript"> 
    var ang = jQuery.noConflict();
</script>
<script type="text/javascript" src="http://mlep.com/~avalon/wordpress/wp-content/themes/twentyten/facebox/facebox.js"></script> 
<script type="text/javascript"> 
   // other jQuery Codes here...
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM