javascript - IE doesn't apply css styles to a dynamically added div -


i have weird problem on ie8. application div via ajax , append html.

$('#formpromocao').submit(function () {         persistpageindex();         var postdata = $(this).serialize();         $.post($(this).attr('action'), postdata, function (data) {             $('#lista').empty();             $('#lista').append(data);             preparenewform();         });         return false;     }); 

this works on browsers except ie8 appended html not stylized browser , cant figure out why.

has here stumbled upon issue before? appreciated.

edit:

i have found problem: html people used html5 application , on ie8 there's script handles html5: http://html5shiv.googlecode.com/

i have find way make script run again when html updated. can safely this?

use shiv function before appending document:

html = innershiv(html, false); $('something').append(html); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -