admin管理员组文章数量:1391977
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/ajax/libs/jquery/1.6.1/jquery.min.js',
plete: 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'*/
]);
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./ajax/libs/jquery/1.6.1/jquery.min.js',
plete: 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'*/
]);
Share
Improve this question
edited Jun 12, 2011 at 11:57
tjm
asked Jun 12, 2011 at 0:30
tjmtjm
7,5502 gold badges33 silver badges54 bronze badges
1 Answer
Reset to default 8You probably forgot to include the yepnope.ie-prefix.js
file.
本文标签: javascriptModernizrload (yepnopejs) IE conditional confusionStack Overflow
版权声明:本文标题:javascript - Modernizr.load (yepnope.js) IE conditional confusion - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744711661a2621164.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论