我有一个WordPress网站,我已经安装了一个插件,插件在IE6浏览器中有一些问题。
因此,当使用jQuery浏览器查看页面时,我希望禁用该IE6插件。
因此,现在我需要一个语句来禁用从其他JS文件加载的所有其他语句。
发布于 2014-04-18 16:58:29
使用底层-公开的条件注释:
<!--[if lte IE 6]><![if gte IE 7]><![endif]-->
<!-- keep your script in between these two comments,
it will work in all browser except ie -->
<!--[if lte IE 6]><![endif]><![endif]-->
发布于 2014-04-18 17:01:48
我不太清楚为什么IE6会出现在你的日程上,但每个人都有自己的。
如果是我,我会写这样的东西。
<!doctype html>
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->....
.....
(function ($) {
"use strict";
// Detect IE 6
var greatGreatGranddadsBrowser;
if ($('html').is('.ie6')) {
greatGreatGranddadsBrowser = true;
}
if (greatGreatGranddadsBrowser) {
// Remove the elements that you don't want loaded
// Tell the users to seriously consider coming into the real world
} else {
// Do whatever else you need to do
}
}(jQuery));
https://stackoverflow.com/questions/23157769
复制相似问题