slide animation skipped when using updatepanel callback
- by superexsl
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