I have a javascript code that generates some elements on the page.But since the data of these newly generated elements comes from an external source,it may take a while for these elements to load. The thing I want to do is that I want to do some things AFTER these elements are loaded.So I decided I should check if the elements have appeared yet every second and then execute my other coeds.
this is what I want to do:
//start a timer like event handler which occurs every second
//in every second{
if ($(".elementthatmustappear").is(":visible"))
{
//stop the timer
//execute other codes
}
else
{
//don't stop the timer.continue checking
}
}
is there a way of doing this?