Foundation's JavaScript plugins can be installed at the top or bottom of a page. However, it is recommended that they be installed at the bottom; this will cause less delay in displaying the page content.
The simplest way to install JavaScript plugins is to install the complete Foundation package or choose plugins selectively in the custom download. Either way, use the JavaScript code from the bottom of the index.html
file that comes with the download as your model. Copy the JavaScript code from that file to your page—change only the file locations if necessary—and you should be good to go.
To get started, you can load the entire JavaScript we have just described. But when you are going into production with a website, it is wise to load only the files you actually use.
Let's look at the way Foundation loads its JavaScript files. Using your favorite text editor, open the index.html
file from a default installation of Foundation. The default installation will include all...