Although I mentioned the answer in comments about the question a long time ago, I thought it was better to write it in a few more points.
When installing Zurb Foundation 6 using bower (command line), it gives you a nice index.html page that has a <script> tag that links to an external js file located in root\js\app.js , app.js file by default has the following code:
$(document).foundation();
So, you already have everything to start.
But that wasn't how it worked until Foundation 6 and I knew about these changes. I did not go through the contents of app.js since I assumed it was empty . I just made the old way to call them in my html pages by writing the following code:
<script type="text/javascript"> $(document).foundation(); </script>
This double type refers to elements of the jQuery-based Foundation element, creating a warning in the browser console.
The solution was to remove any of the calls , but actually deleting the code written in the external js file makes more sense for the following reasons:
- External links require an additional
http request, which greatly increases the loading time of precious pages. Why not reduce it if you can. - Calling jQuery-based elements on the site should be done as early as possible so that each element gets its original form in an instant. Therefore, it makes sense to mention the call in the html page, rather than requesting an external file for the call.
So, delete the code specified in the external js file , i.e. your app.js file. The warnings disappear.
Hari harker
source share