941 Posts in 272 Topics by 292 members
Forum Module
SilverStripe Forums » Forum Module » Javascript problem
Discuss the Forum Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 1918 Views |
-
Javascript problem

19 June 2009 at 4:24am
Hi,
I'm currently finishing a site for a school organization which I am a part of and I just have some minor problems that I wanna fix. I used mootools (js framework) to animate my main navigation but it seems that it doesn't work once I view the forum and event calendar pages. I tried to trace the problem and I found out that those pages have javascript includes which may conflict with the ones I have written.
Here is the site btw: http://lexlounge.com/
Can anyone help me with this problem?
-
Re: Javascript problem

19 June 2009 at 6:27am
sometimes for some pages SS use jQuery and Prototype, both has the $ function, but for jQuery there is a way to avoid the conflicts by calling the jQuery.noConflicts() function.
I am not sure whether mootools has that too. Check it with that, also I tried to help one of my friends with this, but I couldnt find a way to solve it. if anyone can it will be a great help.
-
Re: Javascript problem

19 June 2009 at 1:08pm
Thanks! Just what I needed, I didn't know that these pages used JQuery and Prototype and I'm not familiar with the $ function as well. I'll try to solve it myself in the meantime. But to anyone who is an expert or who is familiar with this problem, please do help. Thanks a lot!
Thanks Nivanka!
-
Re: Javascript problem

19 June 2009 at 2:41pm
welcome,
I am too eager to find out a way to use mootools with other javascript libraries. I think better if you can post on their forums.
-
Re: Javascript problem

19 June 2009 at 2:51pm Last edited: 19 June 2009 2:56pm
I just followed your advice and used jQuery.noConflict(); as an inline script right after the call to the core main jquery library.
I inserted it within the CalendarUI.class.php on line 23, within the customScript. And with others that also required jquery, I just placed this line of code after each call:
Requirements::customScript("
jQuery.noConflict();
");I'm not sure if this is safe but it works nonetheless. Thanks again Niv!
Cheers,
Vic -
Re: Javascript problem

7 July 2009 at 4:28pm
Hi,
I'm having the same problem with mootools.. In my main page, i have an animation using mootools, but when i create a form there (which will create javascript validation), the animation stop working, and it gave me this javascript error : $$.shared is not defined.
Anyone can help me? Please tell me where to put the jquery.noconflicts function?
-Draft
| 1918 Views | ||
| Go to Top | Next > |



