adding jquery plugin to Zurb's Foundation Framework

六眼飞鱼酱① 提交于 2019-12-10 22:34:31

问题


I am working with Zurbs's Foundation rapid prototyping framework and very good it is to. I am wondering the proper way to integrate another jquery plugin into it.

foundations is very picky about how you include other plugins. Part of the frameworks is an app.js file full of functions. Should I be adding my new functions direct to there?

Whilst I do understand js (reading ok) I am no js expert so a clearly explained answer please.

Thanks

(site working on is vincentstephens.co.uk/vs5.1/portfolio - trying to integrate a time line slider located at vincentstephens.co.uk/vs5.1/portfolio/portfolio.html)


回答1:


Not sure if I'm missing out on something but you don't need to integrate it to foundation. If you have another jquery plugin in just include the .js as any script and you're done.

The foundation.min.js is a minified file with all foundation plugins as well as jquery - you might want to minify your plugin and add to this file for the purpose of optimizing.

The app.js is where you initialize the plugins. This is generally the file you fiddle your own settings and preferred default values, not touching the foundation.min.js.



来源:https://stackoverflow.com/questions/12318925/adding-jquery-plugin-to-zurbs-foundation-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!