开发者

Modernizr.load (yepnope.js) IE conditional confusion

开发者 https://www.devze.com 2023-03-12 20:52 出处:网络
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 scri开发者_JAVA技巧pt on

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 scri开发者_JAVA技巧pt 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'*/
]);


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

0

精彩评论

暂无评论...
验证码 换一张
取 消