Menu icon Foundation
Modernizr.load()

I am having a bit of trouble using the modernizr.load function with foundation.

I have the typical setup, in the head

head:
modernizr.js

body:
jquery.min.js
foundation.min.js
app.js

In the body before app.js I try something like this:

<script type="text/javascript">
    Modernizr.load(function(){
        console.log('hello world');
    })
</script>

but I just get :

Uncaught TypeError: undefined is not a function (index):18(anonymous function) (index):18

output in the console instead of the message.

Maybe I'm structuring my files wrong or something, can anyone offer some advise on this issue?

modernizrjavascripthtml5

I am having a bit of trouble using the modernizr.load function with foundation.

I have the typical setup, in the head

head:
modernizr.js

body:
jquery.min.js
foundation.min.js
app.js

In the body before app.js I try something like this:

<script type="text/javascript">
    Modernizr.load(function(){
        console.log('hello world');
    })
</script>

but I just get :

Uncaught TypeError: undefined is not a function (index):18(anonymous function) (index):18

output in the console instead of the message.

Maybe I'm structuring my files wrong or something, can anyone offer some advise on this issue?

OWEN ALANZO HOGARTH II almost 5 years ago

ok after looking around it seems that the version of modernizr included w/ foundation doesn't have the Modernizr.load() function.

I went over to the download section to grab the load function and would like to add it to foundation or at least have the minimum required by foundation plus this load function go get everything working.

How can i put these two together?

Mese henny about 1 year ago

The current version of Modernizr available on the website is version 3.x the new build does not contain a couple of tests/support needed for the module. I was installing a new release of the module and it was not working correctly. The browser through an error that it Modernizr.load was not defined. www.krogerfeedback.com Survey