Closed hightman closed 11 years ago
1.8,1.9都不支持
吴勇智 发自我的 iPhone
在 2013-1-30,18:15,hightman notifications@github.com 写道:
刚刚在测试这个 bsie 总体还不错,但是由于项目中早已包含 jQuery,所以在试着替换 jQuery 库时发现用 1.8.0 版时 p-1.html 中的 DropdownMenu 直接卡死(IE6),换用 1.9.0 的 jQuery 则直接报语法错 $.msie 不是对象?
没有太关注 jQuery 的 ChangeLog,也许是 jQuery 哪儿不兼容导致的,CSS方面测试都OK。
不过 test-tooltip.html 这个在 IE6 似乎浮动有点问题。
— Reply to this email directly or view it on GitHubhttps://github.com/ddouble/bsie/issues/1.
这个问题在于哪个环节呢?bootstrap的实现还是jQuery的变动,还是您的补丁…… 有望解决嘛
刚简单测试一下,把您的 bootstrap-ie.js 注释掉后,无论用 jQuery 1.8还是1.9 p-1.html 完全正常了,观察调试中;应该是这里头出现什么不兼容新版jQuery的写法了
简单跟了一下发现就是不兼容在判断IE6的地方,我想既然可以通过以下方式加载,那么就删除在 js 中对IE的判断就可以了。
<!--[if lt IE 7]>
<script type="text/javascript" src="bootstrap-ie.js"></script>
<![endif]-->
在jQuery-1.8.x 中,是下面这段代码导致死循环触发了(IE6)。简单注释掉就好了,dropdownWidthFix 这些代码似乎加与不加从 DEMO 看效果是相同的。
$('.dropdown-toggle', el).parent().on('propertychange', function() {
dropdownWidthFix($('.dropdown-menu:visible', this));
});
谢谢 hightman,此问题已修复。目前兼容 jQuery 1.8和1.9。dropdownWidthFix 用于修复ie6下dropdown中每行item宽度对不齐的问题。
非常遗憾没能支持 nav 中的 breadcrumbs 这个实现的可能性有多大呢,蛮常用。
此外,为什么不考虑把 css 做成补丁覆盖原生的 bootstrap.css 而不是直接修改呢,感觉那样比较方便迁移。
to @haimanman,由于css规则有前后顺序的问题,所以为了让问题简单化,基于 bootstrap 原始代码修改,这么做虽然对IE6来说加载的数据量大一些,但可以很容易用diff工具看到修改的轨迹,以便将来升级到更新的 bootstrap 版本,breadcrumbs 已加入。
刚刚在测试这个 bsie 总体还不错,但是由于项目中早已包含 jQuery,所以在试着替换 jQuery 库时发现用 1.8.0 版时 p-1.html 中的 DropdownMenu 直接卡死(IE6),换用 1.9.0 的 jQuery 则直接报语法错 $.msie 不是对象?
没有太关注 jQuery 的 ChangeLog,也许是 jQuery 哪儿不兼容导致的,CSS方面测试都OK。
不过 test-tooltip.html 这个在 IE6 似乎浮动有点问题。