Cannot select elements with jquery after a html() load in Internet Explorer 8. Mozilla works fine...

Posted by user641379 on Stack Overflow See other posts from Stack Overflow or by user641379
Published on 2011-03-02T14:59:26Z Indexed on 2011/03/02 15:24 UTC
Read the original article Hit count: 160

Filed under:
|
|
|

I have the following code that runs in a display:none; divtab1

function ToggleTab(tab_id)
{
 $('.divtab1').html('<div class="promo2">Testing</div>...more');
 $('.promo2').css("border", "1px solid gray");
}

html document:

<a href="javascript:ToggleTab(1);">try</a>

<div class="divtab"></div>

It works fine in Mozilla but not in IE. The actual data come from an ajax request but nothing can be selected in IE!

Thanks a lot

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html