internet explorer 7 - jQuery $(element).html() not working in ie7 -
i have strange problem ie7. loading content in div element using ajax request. in ajax response html there div id "compare_div" content. when try html using $('#compare_div').html(), returns null.
below javascript code,
function myfunction() { $.ajax({ type : "post", data: data, url : my_url, success : function(response) { $('#parent_div').html(response); var compare_div_html = $('#compare_div').html(); }, error : function(xmlhttprequest, textstatus, errorthrown) { alert(textstatus); } }); return false; }
i getting null in compare_div_html variable. code works fine other browser.
please help.
first check element exists,
if confirm same ensure data not empty
if every thing ok
then try $('#parent_div',"container").html(response);
this solve problem
Comments
Post a Comment