arielsalminen / responsive-nav.js

Responsive navigation plugin without library dependencies and with fast touch screen support.
http://responsive-nav.com
4.07k stars 619 forks source link

Script breaks third-party script in Safari #169

Open lilchen opened 9 years ago

lilchen commented 9 years ago

When trying to use responsive-nav side by side with flickity.metafizzy.co, the responsive-nav JS prevents the Flickity carousel from initializing (but only in Safari!). I'm thinking it must be a way that Safari handles JS in comparison. I have no experience in Javascript, but have been comparing the two JS files side by side in hopes of coming up with a reason.

Flickity: flickity.metafizzy.co

Anyone else have a similar issue or hypotheses? Thanks!

(PS, I'm new on Git so let me know if I handled asking this issue wrong! Will correct.)

lilchen commented 9 years ago

After shifting this script to the last one that renders in my footer include, it seems to have worked (for now). Wondering if it has to do with this piece of code:

"(function (document, window, index) { // Index is used to keep multiple navs on the same page namespaced "

Edit: I was wrong, it's still breaking other scripts =(. The way it loads clashes with other loads.