views:

35

answers:

1

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,

  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"&gt;&lt;/script&gt; 
<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"&gt;&lt;/script&gt; 
<script type="text/javascript"> 
   // other jQuery Codes here...
</script>
Reigel
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
Rosco
@Reigel : Thank you I just changed the sequence as per your instructions and it is working fine now.
Amol