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/.
A:
it should be in this manner of arrangement,
- load other libraries and other non-jQuery scripts
- load jQuery library.
- call jQuery.noConflict.
- load jQuery plugins
- 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>
Reigel
2010-08-06 02:07:10
And now, instead of `$('stuff').whatever()`, you need to use `ang('stuff').whatever()`. When I use jQuery in no-conflict mode, I usually use `$j`, because it is short and close to the normal jQuery function.
Cory Larson
2010-08-06 02:13:50
Rosco
2010-08-06 02:17:41
@Reigel : Thank you I just changed the sequence as per your instructions and it is working fine now.
Amol
2010-08-06 04:54:04