
Originally Posted by
urbini
Hi. Just about the $ sign: I'm trying to use this script in a website where I use $ instead of jQuery because currently it's the only javascript library installed. So in my scripts I write $(document).ready(function() ...
Commenting the initial row jQuery.noConflict() in Featured Image Zoom script seems to make it work, is this correct or have I to do something else?
Thanks a lot
No, that's exactly what to do as long as jQuery is the only $ script library you're using. You do have two options though. That's one. The other is to make your other code noConflict compliant. Often all that's required for that is to change:
Code:
$(document).ready(function() ...
to:
Code:
jQuery(document).ready(function($) ...
But sometimes more is required.
And, as I say, what you've done is fine as long as jQuery is the only $ script library you're using, which I think is a good idea, but isn't always possible.
Bookmarks