Reputation: 11
Can someone help me figure out how to write a no conflict function for js for my weebly website.
http://cadogan.weebly.com/big-name.html
Thank you.
Upvotes: 1
Views: 667
Reputation: 33954
You could try using jQuery
instead of $
, or using the .noConflict()
method:
http://api.jquery.com/jQuery.noConflict/
Upvotes: 0
Reputation: 9615
I assume you mean that you get errors when you try to reference jQuery using $.
Since you are loading Scriptaculous after jQuery, it is overwriting the $ alias to jQuery. You can instead us the jQuery object directly.
jQuery(function() {
jQuery('#mydiv').html("<h1>hi</h1>");
});
Upvotes: 3