Script Conflict

Hi Everyone,

I have this wordpress site here: kohinoorindian.com.au. We have also built a mobile app for this business and want to add a header banner at the top of the mobile page to invite visitors to download the mobile app. We have done this by using the following code.

I have added the following code in Customize > Code > Head Code

<!-- Place inside body tag at the end -->
<!-- Remove script tag below if you already use jQuery -->
<script src=“https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js”></script>
<script src=“https://s3.amazonaws.com/kanta/popup_scripts/jquery.smartbanner.js”></script>

And this code to the Customize > Code > Header Code

<!-- Place inside head tag -->
<meta name=“apple-itunes-app” content=“app-id=1068842595”>
<meta name=“google-play-app” content=“app-id=hr.apps.n207016308”>
<link rel=“stylesheet” href=“https://s3.amazonaws.com/kanta/popup_scripts/jquery.smartbanner.css” type=“text/css” media=“screen”>

However, now the nav menu on mobile does not work. When I take out the code the nav menu works again.

Anyone know how I could fix this and have the mobile app banner showing still?

Any help greatly appreciated.

Hey Fenwick,

You need to remove the jQuery script as that’s already loaded by default. Also, you’ll need to place the first set of codes in the Header Code section, and the second set on the Head Code section, not the other way around. :slight_smile:

Ben

Hi Ben,

Done that but issue still there - nav menu on mobile not working.

Any other ideas?

Hey Fenwick,

Do you mind sharing temp admin access to the site so we can check?

Ben

[Content Hidden]

[Content Hidden]

[Content Hidden]

Hey Fenwick,

What does the banner look like? Can you put the jQuery code again so we can check? Does it only work on your site? I tried it on a live dev URL as well as on my local dev but I can’t see any banners when visiting using my phone.

Ben

Hi Ben - I have added the code back in so you can see what it looks like. Any help fixing this would be most appreciated.

Cheers Fenwick

Hey Fenwick,

I tried logging in again but it seems the user was removed? Can you put it back in?

Re the app, do you know if it works with the newer version of jQuery? The one you’re using is quite outdated 1.8. We’re using the jQuery that comes with WordPress, which is 1.11.3.

Ben

[Content Hidden]

[Content Hidden]

[Content Hidden]

Hey Fenwick,

The menu seems to work on any other pages. Are you doing something special to the homepage? Do you have any security plugins active? Can you try deactivating all other plugins except BB and check if you get the same thing?

Ben

[Content Hidden]

Hey Fenwick,

You’ve a top padding on the mantra site which is causing the gap on the slider.

Re the app, can you disable all plugins on the mantra site, remove the jQuery code that you have on the HTML module and see if that fixes it? Also, did you change the name of the default WP directories? Or is this done by the security plugin that you have?

Ben