MyBB's JS conflicts with jQuery --- how to fix?
#1
Basically, I'm "embedding" my site's forum into the main site's layout.

Of course, since the dropdown and tabs use jQuery, and MyBB uses Prototype, IIRC, there's a conflict, so MyBB's JS functions won't work.

Is there an easy way to fix this (primarily fixing the MyBB JS, since I don't want to touch the JQ stuff)?
Avatar by Rein.
Reply
#2
The easiest way to do things is to use the actual jQuery tag, instead of the $ - because both Prototype and jQuery use this. jQuery is actually friendly with other libraries... just a shame Prototype and others aren't...

Either way, include this before any coding:

jQuery.noConflict(); jQuery(document).ready(function(){

Then you can use...

jQuery("#activator").click(function(){
     jQuery("#movediv").slideToggle(); });

... with no problems. This is the way I've done it (and have had no problems whatsoever). There are other ways - see the jQuery with other Languages on their Wiki.
Reply
#3
EDIT: Nvm, I figured it out. Smile
Avatar by Rein.
Reply
#4
This user has been denied support. This user has been denied support.
Thank you soooo much, i resolve a conflict between jquery menu and java (expand-collapse and thread selection)
Reply
#5
there is already a mybb plugin to include jquery snipets by audentio.com
http://community.mybb.com/thread-85031.html

I´ve tried once and it´s working great.
Reply
#6
This user has been denied support. This user has been denied support.
(02-26-2011, 05:34 PM)aglioeolio Wrote: there is already a mybb plugin to include jquery snipets by audentio.com
http://community.mybb.com/thread-85031.html

I´ve tried once and it´s working great.

Thank you aglioeolio
Reply
#7
Getting jQuery to play nice with code examples.
[Image: 422.png]
Reply
#8
Why arnt mybb using protoype it's stupid there using A less popular library just frustrating at times.
Reply
#9
This user has been denied support. This user has been denied support.
(07-08-2014, 08:05 AM)Spudster Wrote: Why arnt mybb using protoype it's stupid there using A less popular library just frustrating at times.

Uhm... they are?
And if u just miss-wrote your message, they've moved completely to jQuery in 1.8
Beep Boop          
                                          ~ RIP Server 2014-2014
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)