【问题标题】:Coda Slider not working in IE 7 javascript errorCoda Slider 在 IE 7 javascript 错误中不起作用
【发布时间】:2012-06-18 12:05:01
【问题描述】:

您好,我在ChromeFFIE 9 中有 coda 滑块工作正常,但在 IE 6-8 中它不起作用,javascript 调试器说那行代码:

$container.css('width', $panels[0].offsetWidth * $panels.length);

它说:

Unable to get value of the property 'offsetWidth': object is null or undefined

任何帮助都将非常感谢

【问题讨论】:

标签: javascript internet-explorer coda-slider


【解决方案1】:

尝试outerWidth()(jQuery 方法)而不是 offsetWidth。

【讨论】:

  • Bvukelic 你的意思是用 outerWidth() 替换 'offseWidth' 尝试过,但还是不行..tanks。
  • @user1041401 试试$panels.eq(0).outerWidth()
  • 您好,我将 $panels[0].offsetWidth 替换为 $panels.eq(0).outerWidth() 但仍然无法正常工作..谢谢
  • 还有更多帮助吗?谢谢
  • @user1041401:当您将offsetWidth 替换为outerWidth() 时,它会给您一个错误消息吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-11-30
  • 1970-01-01
  • 2012-03-06
  • 2012-01-09
  • 2012-09-20
相关资源
最近更新 更多