Skip to content
Advertisement

PHP Code breaking responsive navigation toggle on homepage

I am having a problem with the responsive menu toggle not expanding on a site I am working on. Essentially when the site is resized below 768px the menu is replaced with a menu toggle that when clicked/tapped it should show the two options About & Shop. However when clicked nothing happens, it simply adds #navigation to the end of the URL.

I have managed to narrow down to one line of code that is for this plugin in my index.php file.

JavaScript

It is a simple WordPress site with WooCommerce using the theme mystile. Link: http://bit.ly/1dvdeb0

If I take out the above code the problem is solved but then of course the slider is no longer activated. Any ideas why or how it can be fixed?

Also, here is the code in context:

JavaScript

Thanks in advance for any help it’s greatly appreciated! 🙂

EDIT: JavaScript page from console error Uncaught TypeError: Object [object Object] has no method ‘fitVids’ :

JavaScript

Advertisement

Answer

From Hobo in the comments above:

fitvids and mobileMenu are both declared in third-party.js. To my eye they look like they don’t need noConflict – I think that’s for when you want to use $ instead of jQuery, but your code uses jQuery, so should be OK. I now think the problem is that jQuery is being included twice – try removing the second one (v1.8.2, from the Google CDN). It’s probably (judging by proximity) where your slicebox.js is included.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement