简体   繁体   中英

Modernizr with Rails Turbolinks gem

I recently decided to add the Rails gem 'turbolinks' to a project and it wouldn't work. A bit of adding and subtracting later and I discovered that it works if I remove modernizr.js. I us modernizr for compatibility as the project will have people accessing it from a bunch of different devices and browsers.

Does anyone have a workaround for this? Is there a set of simple changes I can make to either modernizr.js or turbolinks.js to make them work better together? Is there another simple option that does what either of these does and will work with the other?

Any help would be much appreciated. I'm definitely NOT a javascript whizz, so explanations would be good.

Here is a issue that I faced

https://github.com/rails/turbolinks/issues/270

You need to have modernizer in your included in the head and you can have the js's in the body

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM