I'm u开发者_开发百科sing a simple JQuery call to replace some HTML in a DIV tag after an AJAX call.
$("#my_div").html('value');
This works great in the other browsers, but in IE it is just adding to the DIV instead of replacing the HTML.
Any ideas why that would happen?
call empty()
before html()
$("#my_div").empty().html('value')
I noticed that behavior quite a lot and empty()
always fixes the issue.
精彩评论