forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: Phill Luckhurst on January 24, 2011, 11:34:24 pm

Title: Jquery no-conflict mode
Post by: Phill Luckhurst on January 24, 2011, 11:34:24 pm
I have tried with minimal success to fondle all the files in the js directory to enable the jquery no-conflict mode (http://api.jquery.com/jQuery.noConflict/) but I have struggled to get it right. As a stop gap I ended up doing loads of work replacing $ with jQuery just to get things working for a couple of users who had problems with bridged coppermine installs. These installs had problems as they were also using moo and in one instance a different version of Jquery. So all you js wizzards out there, how do we go about this because I am at a dead end?
Title: Re: Jquery no-conflict mode
Post by: Αndré on January 25, 2011, 02:58:16 pm
Unfortunately my JS skills are far away from being perfect, so I cannot help you very much with that issue.

And even more unfortunately this board cannot be accessed by guests (I currently haven't checked if 'regular' registered members can), so maybe we should move this thread? If almost nobody can read this thread, you probably won't get any response.
Title: Re: Jquery no-conflict mode
Post by: Phill Luckhurst on January 25, 2011, 06:50:16 pm
Yeah, I was hoping some of our talented devs would pick up on it. I'll move this to the General Discussion area.
Title: Re: Jquery no-conflict mode
Post by: Joe Carver on January 27, 2011, 12:50:34 am
@ Phil,

You had a test site with the problem that now returns a 404...any chance you can put it back up?

I would be happy to take a look, although I am not very confidant in my .js skills....
Title: Re: Jquery no-conflict mode
Post by: Phill Luckhurst on January 27, 2011, 04:28:19 pm
I'll get it up tonight and pm you ftp details.

Looking at it it doesn't have to be in the .js files, you can activate the no-conflict mode from the head of the document but I just cannot get it right. If you do it wrong it seems to disable all the js in coppermine. Something that should be simple seems to be a bit of a mare.
Title: Re: Jquery no-conflict mode
Post by: David Stone on March 18, 2011, 04:35:24 pm
I'm having the same problem. Can anyone help to solve it??
Title: Re: Jquery no-conflict mode
Post by: Phill Luckhurst on March 25, 2011, 05:27:03 pm
I've had limited success. As previously said, my site is running but the .js files are heavilly modded to do so.

Using out of the box JS directory I have found that if I put the following code right after the {JAVASCRIPT} token in template.html then everything works excep the upload page. That is where I am currently stuck

Code: [Select]
<script type="text/javascript">
jQuery.noConflict();
</script>
Title: Re: Jquery no-conflict mode
Post by: Felicitacon on April 06, 2013, 09:17:16 pm
The jQuery no conflict mode work like this :
When jQuery script is loaded, jQuery keeps a reference to the window.$ variable so it can restore this back when you call jQuery.noConflict().
To make it works, you must include jQuery after every other javascript framework like mootools.