我正在开发一个 jquery slider ,它似乎在除 ie6 ie7 ie8 之外的所有浏览器中都能正常工作。 我收到这些浏览器的无效属性值。奇怪的是,如果您在 ie 中快速单击底部的方 block , slider 就会工作。当我在 wordpress 中工作时,我已经重新映射了 $docready。
我正在本地工作,所以我创建了一个 fiddle ,如果有人有任何解决方案或想法,我们将不胜感激。
尼克干杯
最佳答案
jQuery 不支持通过animate
实现彩色动画。删除以下语句可修复 IE 的问题:
//headers.not(headers[num]).animate({color:hColor});
// theHeader.animate({color:'#000'});
示例:http://jsfiddle.net/kP4F2/7/
如果您想要为颜色设置动画,您可以包含 jQuery UI,它也可以启用颜色动画。
The jQuery UI project extends the .animate() method by allowing some non-numeric styles such as colors to be animated. The project also includes mechanisms for specifying animations through CSS classes rather than individual attributes.
http://jsfiddle.net/niklasvh/kP4F2/11/
有关可以使用 animate
执行哪些操作的更多信息,请查看文档 here 。未包含的内容很可能可以使用 jQuery UI 来完成。
关于javascript - Jquery 在 ie6 ie7 ie8 中返回 slider 的无效属性值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6436096/