Menu icon Foundation
Invoke Foundation?

I have to add a bunch of shivs (thankfully found on this site and working really well!!!!) to make my Foundation-based site work on IE11 in compatibility view (10/9). While learning and getting all the shivs in place, one of the folks included the following statement saying "now it is safe to invoke foundation". I've created my pages with and without adding that piece of code and it seems to be working just fine either way. I see that it is copied in other responses to questions as well. What is this actually invoking? Is it telling my page to load the css? or to load js? But I actually do not call foundation.js - I have several others like the jquery.mobile-1.4.5.min.js, and modernizr.js and slick.min.js. I am not using a lot of the functionality of foundation.css options. So am I actually missing a bunch of foundation functionality if I do not use the script statement below?

<script>
$(document).foundation();
</script>
            

         

Foundationjs

I have to add a bunch of shivs (thankfully found on this site and working really well!!!!) to make my Foundation-based site work on IE11 in compatibility view (10/9). While learning and getting all the shivs in place, one of the folks included the following statement saying "now it is safe to invoke foundation". I've created my pages with and without adding that piece of code and it seems to be working just fine either way. I see that it is copied in other responses to questions as well. What is this actually invoking? Is it telling my page to load the css? or to load js? But I actually do not call foundation.js - I have several others like the jquery.mobile-1.4.5.min.js, and modernizr.js and slick.min.js. I am not using a lot of the functionality of foundation.css options. So am I actually missing a bunch of foundation functionality if I do not use the script statement below?

<script>
$(document).foundation();
</script>
            

         

This post has been closed. No new replies can be added.

Rafi Benkual over 2 years ago

This is what initialized all foundation JavaScript components. If you are not using any, you can leave it out. It will not affect the CSS only components.

Sherry Bradford about 1 year ago

Rafi - are these two statements doing the same thing?

$(document).ready(foundation)();

AND

$(document.foundation();