jQuery.noConflict
Permalink
I recon it's a bit to ask, but I've been using other libraries in some of my work and jQuery has this wonderful noConflict feature which will allow the side-by-side use of other popular libraries (I'd been using mootools).
Anyway, I've gone through and modified all the tokens to get it to work but I imagine at some point I'm going to need to look at updating the code to a more recent release; which will of course require I do it again (and again and again..).
I'd be happy to make the changes myself but I'm afraid the quality of my work might leave something to be desired (I'm a self-teaching novice programmer; my field is operation/systems).
The upside is aside from the initial work the noConflict feature requires very little change and I'd imagine the benefits might make it something worth at least considering.
Thanks for the great work and the great project!
Anyway, I've gone through and modified all the tokens to get it to work but I imagine at some point I'm going to need to look at updating the code to a more recent release; which will of course require I do it again (and again and again..).
I'd be happy to make the changes myself but I'm afraid the quality of my work might leave something to be desired (I'm a self-teaching novice programmer; my field is operation/systems).
The upside is aside from the initial work the noConflict feature requires very little change and I'd imagine the benefits might make it something worth at least considering.
Thanks for the great work and the great project!
Currently trying to get the sliding-door Wordpress theme working in c5 and mootools is killing the c5 edit bar.
anyone care to submit a patch on this? I think my standard answer would be "disable moo in edit mode" but obviously that's pretty thin.
Disabling mootools while in edit mode would probably work good enough for my project. How would I do that?
didn't test this
<?php if (!$c->isEditMode()){ // c is not in edit mode ?> //your mootools include goes here. <?php }?>
This worked great for if I'm in edit mode, but what about if I'm logged in at all? I'd like to see the c5 top bar even out of edit mode.
I tried:
if (!$u->isLoggedIn())
but I get:
Fatal error: Call to a member function isLoggedIn() on a non-object in /Applications/MAMP/htdocs/themes/slidingdoor/default.php on line 8
I tried:
if (!$u->isLoggedIn())
but I get:
Fatal error: Call to a member function isLoggedIn() on a non-object in /Applications/MAMP/htdocs/themes/slidingdoor/default.php on line 8
as it says..
1. try add global $u;
2. if this doens't work, create a new user object $u = new User();
1. try add global $u;
2. if this doens't work, create a new user object $u = new User();
Got it to work by using this:
Appreciate the help!
if (!$_SESSION['uID'] > 0) { ... }
Appreciate the help!
I think someone posted a patch for this a while ago. I'm quite sure it doesn't work wiht 5.3.3 out of the box but it might be a good start.
About disabling - you simply don't include mootools.
About disabling - you simply don't include mootools.
he's probably looking for the if inEditMode syntax.
Yes, that's what I was looking for. Thanks all!!
I know this is an old thread, but I just ran into a conflict with C5 and noconflict() on the current C5 release. Thought I'd throw out the workaround that finally got both my script and the C5 edit bar to work at the same time...
By changing the in my template's functions.js file to I was able to eliminate using noconflict() altogether.
In case it helps...
By changing the
$(document).ready(function() {
jQuery(function( $ ){
In case it helps...
I'm a huge jQuery fan but I had a project with mootools where I had a lot of problems because of this conflict too..