Forums | Mahara Community
jQuery and Mahara
03 May 2011, 4:57 PM
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?
05 May 2011, 5:41 AM
Have you tried replacing $ in your jQuery code with $j?
You should see in web.php that $j=jQuery, to prevent conflicts with Mochikit.
05 May 2011, 5:03 PM
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.