I have cross browser tested a page which contains a jslider. It functions as expected in all browsers/versions except IE8 which throws a script error, "Object does not support this property or method" . When I run the build in IE script debug facility it identifies the issue to be with line element.attachEvent("on" + actualEventName, responder)
in the following function (this line of code is the last line before the function return):
function observe(element, eventName, handler) {
element = $(element);
var responder = _createResponder(element, eventName, handler);
if (!responder) return element;
if (eventName.include(':')) {
if (element.addEventListener)
element.addEventListener("dataavailable", responder, false);
else {
element.attachEvent("ondataavailable", responder);
element.attachEvent("onlosecapture", responder);
}
} else {
var actualEventName = _getDOMEventName(eventName);
if (element.addEventListener)
element.addEventListener(actualEventName, responder, false);
else
element.attachEvent("on" + actualEventName, responder);
}
return element;
}
Any ideas what the issue may be?
_getDOMEventName()返回值吗?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.