why doesn't .html() work in internet explorer 7
i have an asp.net-mvc site and i am getting weird behavior in internet explorer 7 on one page where the html result of an ajax call isn't showing up on the screen. This works perfect in Firefox, Chrome and IE8.
I first thought it was ajax related but to simplify and isolate the issue i got this to NOT work in IE7
$("#cupcakeOfMonthYear").live("click", function () {
$('#cupcakeOfMonthCalendar').html("ffffff");
});
Again, this works perfect in Firefox, Chrome and IE8 but when i change to compatibility mode to get the IE7 experience, the whole div area goes blank (instead of refreshing with the updated h开发者_C百科tml).
Is this a bug in IE7?
i figured out the issue. i was calling
.html(data)
on the table selector itself and it seems like IE7 doesn't like this. i put a div surrounding the table and when the table came back from the ajax call. i called
.html(data)
on the outer div and that worked fine. It actually makes sense as .html() doesn't seem to include the outer html but i guess all modern browsers figure it out and do the right thing anyway.
Which jquery blocking library (and which version) are you using ?
I mostly know of blockUI
Which seems to have a related SO post on your problem.
精彩评论