yeah in that case. I prefer only sticking to one library per site... On Sat, Apr 18, 2009 at 3:59 AM, Karl Swedberg <k...@englishrules.com>wrote:
> > > On Apr 17, 2009, at 9:37 PM, waseem sabjee wrote: > > instead of > jQuery(document).ready( >> >> function(){ >> alert("Thanks for visiting!"); >> }); > > > try doing this > > $(function() { > alert("Thanks for visiting!"); > }); > > make sure all your jquery is wrapped in that function. > example > > $(function() { > alert("Thanks for visiting!"); > $("#myid").click(function() { > // do code > }); > }); > > all should be in the same function. > this would reduce the possibility of conflicts as well. > > > Sorry, but that's not true. If there are conflicts with other libraries, > then exposing the $ function is only going to make things worse. > For safe encapsulation, try this: > > jQuery(document).ready(function($) { > > // do your thing here. > > }); > > > Also, take a look at http://docs.jquery.com/Core/jQuery.noConflict > > > > --Karl > > ____________ > Karl Swedberg > www.englishrules.com > www.learningjquery.com > >