Jquery no-conflict mode Jquery no-conflict mode
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Jquery no-conflict mode

Started by phill104, January 24, 2011, 11:34:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

phill104

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?
It is a mistake to think you can solve any major problems just with potatoes.

ΑndrĂ©

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.

phill104

Yeah, I was hoping some of our talented devs would pick up on it. I'll move this to the General Discussion area.
It is a mistake to think you can solve any major problems just with potatoes.

Joe Carver

@ 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....

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

David Stone

I'm having the same problem. Can anyone help to solve it??
 *Link Removed*
*Link Removed*

phill104

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

<script type="text/javascript">
jQuery.noConflict();
</script>
It is a mistake to think you can solve any major problems just with potatoes.

Felicitacon

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.