Resolving conflict between multiple jQuery files

I have several jquery files in my project. I use facebox with jquery1.4.2, but I need prototypes and scripting scripts. I used jQuery.noconflict (); in my code, but it does not work. this is url http://mlep.com/~avalon/wordpress/ideas-and-insights/case-studies/ .

+3
source share
1 answer

he should be that way

  • load other libraries and other scripts other than jQuery
  • load jQuery library.
  • call jQuery.noConflict.
  • download jQuery plugins
  • other jQuery files or codes.

such codes

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

Source: https://habr.com/ru/post/1758309/


All Articles