Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modernizr.load (yepnope.js) IE conditional confusion

In the following code dd_belatedpng.js is loading despite the fact that I'm using Firefox 4.0.1. According to the yepnope.js documentation, the ielt7! prefix should cause the script only to load if the browser is IE less than version 7. Is this functionality removed from the Modernizr.load implementation (I believed that one was just an alias for the other), or a bug, or, as I suspect, me just missing/misunderstanding something obvious? Thanks for your help. Here's the code.

Modernizr.load([
    {   
        load: '//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js',
        complete: function() {
            if(!window.jQuery) {
                Modernizr.load('/inc/jquery-1.6.1.min.js');
            }   
        }   
    },  
    {   
        load : 'ielt7!/inc/dd_belatedpng.js',
        callback: function() {
            $(function() {
                DD_belatedPNG.fix("img, .png_bg");
            }); 
        }   
    }/*,
    'jquery.plugins.js',
    'my.scripts.js'*/
]);
like image 336
tjm Avatar asked Jun 12 '11 00:06

tjm


1 Answers

You probably forgot to include the yepnope.ie-prefix.js file.

like image 178
Mathias Bynens Avatar answered Sep 22 '22 13:09

Mathias Bynens