zurb / joyride

jQuery feature tour plugin.
http://www.zurb.com/playground/jquery-joyride-feature-tour-plugin
1.42k stars 240 forks source link

Using Joyride when you are already using Modernizr.mq #152

Open itsmattsoria opened 10 years ago

itsmattsoria commented 10 years ago

The app I'm using Joyride with already has a custom build of Modernizr that includes the media query check, so for the sake of not being redundant I don't want to include the modernizr.mq.js file included with Joyride. After some testing I found that the Modernizr.mq wasn't being used though, rather the fall-back jquery $window.width() (line 360 of jquery.joyride-2.1.js), which is inconsistent.
Getting rid of Modernizr = Modernizr || false, on line 54 of jquery.joyride-2.1.js fixes the issue though, and it is my understanding that in theory it should still work if using the included modernizr.mq.js file. Can this line be removed? Has anyone else had the same issue? I submitted a pull request to add an option in the settings to set your own breakpoint rather than the default 768px as well (#151), but that also is sort of redundant if you are using your own build of Modernizr.