Jquery Conflict w/ other scripts

Download and support for PhpBB3 Top Stats Mod
kevinva
BBCoder II
BBCoder II
Posts: 6
Joined: 10 Aug 2013, 19:09
BBCodes: 14

Jquery Conflict w/ other scripts

Post by kevinva »

Hello,

This is kind of a long shot, but I figured I’d ask over here, just in case you know of a workaround.

I’m running wordpress with phpbb, by way of WP-United. Mantra is my wp theme, so WP-United wraps Mantra/wordpress around phpBB. So this means that all of the menus created in WordPress/Mantra can be accessed while I’m browsing the forum.

This is where Top Stats comes into play. I can utilize this mod in phpBB, but when I do, all of my drop-down menus from wordpress stop working. As soon as I browse to another page on the forum (a forum without the script running), all of my drop-down menus work again.

I believe the menu utilizes jquery and I know that Top Stats does, as well. So, I think there's a conflict between the two. If I disable Top Stats, the menus work. If I turn on Top Stats, the menus stop working.

Do you know if it’s possible to run two instances of jquery on the same page, at the same time? If so, is there something I can do to make both work correctly?

Thanks very much,

Kevin

I can't post the URL to my forum, so you can check it out, but let me know if you need the link and I'll try to post it via PM or something.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Jquery Conflict w/ other scripts

Post by Stoker »

Its probably this line in overall_header.html that does the terror:

Code: Select all

<script src="{ROOT_PATH}script/jquery.min.js" type="text/javascript"></script>
Remove it and see if it helps.
Board rules! No PM support
kevinva
BBCoder II
BBCoder II
Posts: 6
Joined: 10 Aug 2013, 19:09
BBCodes: 14

Jquery Conflict w/ other scripts

Post by kevinva »

Ok, just tried that, refreshed the template files & purged the cache. That fixed the menu, but now, neither the ticker, nor the scroll will work anymore.

Now it just lists all 5 active topics at the top, but it won't do anything.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Jquery Conflict w/ other scripts

Post by Stoker »

You can post a link to your forum now.
Make sure to enable the mod so I can see it it action on your site.
Board rules! No PM support
kevinva
BBCoder II
BBCoder II
Posts: 6
Joined: 10 Aug 2013, 19:09
BBCodes: 14

Jquery Conflict w/ other scripts

Post by kevinva »

User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Jquery Conflict w/ other scripts

Post by Stoker »

Im not sure what the problem is because Im not able the read all the scripts included by WP, sorry.
Board rules! No PM support
kevinva
BBCoder II
BBCoder II
Posts: 6
Joined: 10 Aug 2013, 19:09
BBCodes: 14

Jquery Conflict w/ other scripts

Post by kevinva »

Nuts. Is there anything I can do to help you see what scripts are used by WP?
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Jquery Conflict w/ other scripts

Post by Stoker »

No, the problem is that I dont understand how it works.
Board rules! No PM support
kevinva
BBCoder II
BBCoder II
Posts: 6
Joined: 10 Aug 2013, 19:09
BBCodes: 14

Jquery Conflict w/ other scripts

Post by kevinva »

Ah, ok, gotcha'. Thanks anyway, Stoker, I appreciate the help. =]
User avatar
RMcGirr83
BBCoder III
BBCoder III
Posts: 104
Joined: 08 Mar 2010, 13:17
Favourite MOD: mChat
Contact:

Jquery Conflict w/ other scripts

Post by RMcGirr83 »

It is probably because wp is including version 1.10.2 of jquery library which may or may not work with the menu and stokers mod. So try replacing the WP jquery with a google CDN like

Code: Select all

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
and remove the jquery that stoker told you.

https://developers.google.com/speed/lib ... ide#jquery
Locked