Forums | Mahara Community

Developers /
JQuery in Mahara


Mark  Melia's profile picture
Posts: 8

16 November 2010, 5:39 AM

Hello everyone,

Do you know if it is possible to use JQuery with Mahara - I tried but the JQuery search function $ - seems to be reserved for mahara function call.

Thanks,

Mark

Mark  Melia's profile picture
Posts: 8

16 November 2010, 8:24 AM

I just used jQuery.noConflict to solve this problem.

Mark

anonymous profile picture
Deleted user
Posts: 808

16 November 2010, 6:18 PM

Hi Mark, in case you're interested, jQuery is available on the master branch now as part of Evan Goldenberg's image gallery blocktype, and should be in Mahara 1.4.  Most of Mahara's js uses Mochikit and needs $, so jQuery will be available as $j.  Doesn't look like noConflict is on, we're just making sure jQuery gets loaded first and letting $ get clobbered by Mochikit.

Ruslan Kabalin's profile picture
Posts: 146

17 November 2010, 4:15 AM

Are there chances to migrate completely from Mochikit to JQuery in the future? If so, then it probably worth annoucing somewhere in wiki that all new features should use JQuery (or plain javascript) only.

anonymous profile picture
Deleted user
Posts: 808

17 November 2010, 3:41 PM

Hi Ruslan,

I agree that would be nice, but the chances of a complete migration are low, because rewriting everything in jquery is a lot of work, and it's pretty low priority while old code is still working.  Significant chunks of self-contained js that are being written from scratch or need to be rewritten for some reason can and probably should use jquery, but I think Mochikit code might hang around in Mahara for years.  That's just based on my experience with other things we've tried to change slowly, like phasing out tablerenderer.js (still used in quite a few places even though we wanted to remove reliance on it from about v0.9 or something), and removing reliance on javascript (there are still several pages that need it, that's why we still have to hide the login form when js is off).

anonymous profile picture
Deleted user
Posts: 41

21 April 2011, 4:52 AM

Hello Mark and everyone

Can you pleas send more detalies because I am having the same problem around here
Thanks

6 results