I am using a completely new installation of Foundation 6 and trying to set up a closing switch ( http://foundation.zurb.com/sites/docs/toggler.html ).
For some reason, I get this error though ..
Uncaught TypeError: Cannot read property '_init' of undefined
on line 245 of the foundation.core.js file.
This is HTML on my page, right from the closing example in Foundation documents.
<div class="callout" data-closable> <button class="close-button" data-close>×</button> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore praesentium sint alias dolorum qui vel quaerat, libero consequatur non esse asperiores veritatis commodi, odit eum ipsam nemo dicta iste aliquam.</p> </div>
This is the javascript that I have at the bottom of my HTML, before </body> .
<script src="bower_components/jquery/dist/jquery.js"></script> <script src="bower_components/foundation-sites/js/foundation.core.js"></script> <script src="bower_components/foundation-sites/js/foundation.toggler.js"></script> <script> $(document).foundation(); </script>
I'm not sure what I'm doing wrong here or what I am missing. Everything works if I load the entire JavaScript library in JavaScript, but this is a complete overflow for what I need.
source share