Html is rendered event

Posted by Idsa on Stack Overflow See other posts from Stack Overflow or by Idsa
Published on 2010-03-29T21:27:24Z Indexed on 2010/03/29 21:33 UTC
Read the original article Hit count: 383

Filed under:
|

I'm appending some code to my page using jQuery AJAX calls. This code is a mix of html and javascript. But I want javascript to be executed only when html part is ready. But what event is raised when appended html is rendered?

Here is an example:

<table id="sampleTable">
   ...
</table>

<script>
  // this code should be executed only when sampleTable is rendered
  $('#sampleTable').hide();
</script>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery