I am using jQuery in my Rails application. I wanted to add a expand collapse text effect in my page. So I downloaded the jQuery exapander plugin and tried to use it. I am facing a weird problem.
My jQuery.js file is having this line called jQuery.noConflict(); at the end. I have to remove it to make this expand collapse effect to work. But then, when I remove it, a calendar component that I have used somewhere else in the app is not working.
Please help me out here.
Thanks.
noConflict()causes jQuery to relinquish control of the$variable. Are you using another library on the same page that also uses$? Does the calendar component use jQuery?If your page has this:
Then from that point onward,
$is not jQuery. So:You can also do this:
and then: