The only thing I might guess is to do jQuery.noConflict() immediately after loading jQuery, before loading any other scripts. --Erik
On Tue, Jan 6, 2009 at 8:04 PM, Magnificent < imightbewrongbutidontthin...@gmail.com> wrote: > > Hello all, > > I'm trying to incorporate jquery into pages with prototype. This is > what I'm doing in order: > > 1) Load prototype/scriptaculous > 2) Load jquery > 3) Execute jQuery.noConflict(); > 4) Execute jquery via (function($) { ...... })(jQuery); > > The jquery code isn't being executed (prototype is), does anything > look obviously wrong with what I'm doing? I've included a mock of my > page source below. > > <html> > <head> > <script src="./js/prototype_min.js" type="text/javascript"></script> > <script src="./js/scriptaculous/effects_min.js" type="text/ > javascript"></script> > > <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ > libs/jquery/1.2.6/jquery.min.js<http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js> > "></script> > <script type="text/javascript" src="js/jqModal.js"></script> > > <script type="text/javascript"> > jQuery.noConflict(); > </script> > </head> > <body> > > page stuff > > <script type="text/javascript"> > //SOME PROTOTYPE STUFF > (function() { > //all <a> tags inside if a <div class="links"> tag will open > in a > new window. > Behaviour.register({ > 'div.links a' : function(a) { > a.onclick = function() { > window.open(a.href); > return false; > } > } > }); > > more prototype stuff > })(); > > > //START JQUERY > (function($) { > > //START DEMO MODAL > var closeModal = function(hash) { > var $modalWindow = $(hash.w); > > $modalWindow.fadeOut('2000', function(){ > hash.o.remove(); // removes overlay > }); > }; > > more jquery stuff > > })(jQuery); > //END JQUERY > </script> > > </body> > </html>