我使用diapo滑塊,似乎是在所有其他瀏覽器的工作除了Internet Explorer 8中IE 8:對象不支持屬性或方法「getElementsByClassName方法」
在調試模式下,我得到運行IE8後以下錯誤:
SCRIPT438: Object doesn't support property or method 'getElementsByClassName' prototype.js, line 5988 character 5
return function(className, parentElement) {
return $(parentElement || document.body).getElementsByClassName(className);
};
SCRIPT438: Object doesn't support property or method 'fireEvent' prototype.js, line 5736 character 7
if (document.createEvent)
element.dispatchEvent(event);
else
element.fireEvent(event.eventType, event);
return Event.extend(event);
我運行這個滑塊Magento的平臺,似乎原型SCR ipt在有問題的那個。它使用的原型版本是1.7,因此排除了腳本更新的可能修復。
注意:雖然,我不是在IE9中具有顯示器的問題,我收到以下錯誤:
SCRIPT438: Object doesn't support property or method 'dispatchEvent' prototype.js, line 5734 character 7
if (document.createEvent)
element.dispatchEvent(event);
else
element.fireEvent(event.eventType, event);
return Event.extend(event);
這些都是必需的diapo滑塊工作的腳本,在標題中加載腳本標記。我不知道,但也許其中某些腳本與現有腳本發生衝突:
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/scripts/jquery.min.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/jquery.mobile-1.0rc2.customized.min.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/jquery.easing.1.3.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/scripts/diapo.js'></script>
感謝羅布,但我將如何應用此修復...我更新我的帖子有關使用腳本的更多相關細節?請讓我知道這可不可以幫你。非常感謝! – gdinari
您在同一頁面上使用jQuery和Prototype.js。有沒有機會與對方發生衝突? Diapo不使用Prototype.js,但仍然遇到與Prototype.js相關的錯誤。 –
是的,原型腳本是magento平臺的一部分,所以默認上傳它...我可以嘗試禁用它只爲主頁,但我也有興趣在您的polyfill解決方案 – gdinari