最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - IE < 9 showing displaying "Member not found" - Stack Overflow

programmeradmin1浏览0评论

I am seeing the "SCRIPT3: Member not found." error in IE < 9 . Looking at various locations, (eg., Member not found IE error (IE 6, 7, 8, 9)) it seems to occur at the setTimeout inside .hover() portion.

I followed the steps in the but still am having the same problem. I would be greatful for any help.

Probably it could also occur at places inside the change() fn.

I have placed the entire code at : /

I am seeing the "SCRIPT3: Member not found." error in IE < 9 . Looking at various locations, (eg., Member not found IE error (IE 6, 7, 8, 9)) it seems to occur at the setTimeout inside .hover() portion.

I followed the steps in the but still am having the same problem. I would be greatful for any help.

Probably it could also occur at places inside the change() fn.

I have placed the entire code at : http://jsfiddle.net/f4tZQ/

Share Improve this question edited May 23, 2017 at 12:22 CommunityBot 11 silver badge asked Nov 3, 2011 at 10:07 maan81maan81 3,6098 gold badges38 silver badges55 bronze badges 3
  • can you add your edit as an answer? – user69820 Commented Nov 3, 2011 at 11:10
  • In jquery-1.6.2.js file, line 3172, I commented out ` e.cancelBubble = true; ` and inserted ` if (typeof e.cancelBubble !== 'unknown') { e.cancelBubble = true; } ` . In other words, a slight modification of the original jquery file. – maan81 Commented Nov 3, 2011 at 11:22
  • Sorry. Wanted to add code : commented out - e.cancelBubble = true; and inserted - if (typeof e.cancelBubble !== 'unknown') { e.cancelBubble = true; } – maan81 Commented Nov 3, 2011 at 11:29
Add a comment  | 

2 Answers 2

Reset to default 8

For others who get here who don't want to modify the jQuery source...(FOR THE LOVE OF GOD DON'T DO THAT)

This happens in ie<9 when firing custom events. If you have access to the event before it gets to the point where ie crashes, just travel down the originalEvent chain and set the last one = {};

The below code is for when you are relying jQuery to process the event handlers return value (false) somewhere down the chain. If you want to cancel the event here, see the comments - wrap a call to e.stopPropagation() in a try/catch block

var handleAndFire = function(e) {
 var ev = new $.Event('stack.overflow');

    //you may have to debug and manually inspect to see how 
    //deep the originalEvents go
    //or you could write your own function to traverse 
    //depth first and find it automatically, I'm lazy.
    e.originalEvent.originalEvent = {}; //fix for ie < 9
    ev.originalEvent = e;
    $(document).trigger(ev);    
}
$(document).click(handleAndFire);

After sometime searching, I seems to be affected by jQuery bug. Following the "comment:4" , changing the jQuery-1.6.2.js file, line 3172 solved the problem.

if (typeof e.cancelBubble !== 'unknown') { e.cancelBubble = true; } 

Don't ask why, but it worked... For some reason jQuery or IE returns 'unknown' here in stead of 'undefined'.

Obtained from :

Source : http://bugs.jquery.com/ticket/10004

发布评论

评论列表(0)

  1. 暂无评论