Forums | Mahara Community
Developers
/
jQuery and Mahara
03 May 2011, 16:57
Hello Everyone,
I was trying to insert a jquery code to Mahara (a sliding bar using jquery) but as excpected it did not work, I googled it up many people suggest to use the jquery.noconflict() function I tried many times but it did not work.
Someone in the forums asked about it but the answer was too short, so I was able to have jquery script runing.
Can you please help me with that?
Best,
Mohammad
05 May 2011, 5:41
Hi Mohammad,
Have you tried replacing $ in your jQuery code with $j?
You should see in web.php that $j=jQuery, to prevent conflicts with Mochikit.
Best wishes,
Mike
05 May 2011, 17:03
Hi Mohammad,
I have posted a demo blocktype that uses jQuery. Discussed here.
I would recommend strongly against the use of $j. The recommendation is to use jQuery instead of $ in a noConflict mode. If you write your code in the form of a jQuery plugin, you are free to use $ within the plugin scope. The plugin option makes it easier to reuse your code in different environments.