Wednesday, May 30, 2012

IE7 Hack For Jquery .attr

I have been working with this issue for two days, and i googled so much and i cant resolve this. but finally i got one thread that the IE rendering it as simply object

$("input").each(function() { $(this).addClass($(this).attr("type")) });  

This was the actual code, but when the page is loaded in ie7 the browser suddenly got stuck and went to not responding, finally i found the error code in my javascript file and i replaced it with

    $("input").each(function() { $(this).addClass($(this).attr("type") || $(Object).attr("type")) });

i ve found that the similar issue was reported earlier in jquery bugtracker

Bug 1 
Bug 2 
bug 3 

No comments:

Post a Comment