slide animation skipped when using updatepanel callback
Posted
by superexsl
on Stack Overflow
See other posts from Stack Overflow
or by superexsl
Published on 2010-03-17T01:34:06Z
Indexed on
2010/03/17
1:41 UTC
Read the original article
Hit count: 428
Hey,
I'm trying to use UpdatePanels and JQuery but the panels seem to cancel out the JQuery. I want the user to press the search button, have the system perform the search using AJAX and then display the search results by sliding down the div using JQuery. However, it seems that if there are any delays, (I put the thread to sleep for a second), then the results just appear instead of sliding down. If I remove the sleep thread
the sliding animation is fine. I've got the code below to execute the JQuery once the AJAX is loaded:
<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_pageLoaded(showDiv);
function showDiv(sender, args){
$("#results_bar").slideDown('slow');
}
</script>
Any ideas why the animation is skipped if there's a delay?
Thanks
© Stack Overflow or respective owner