jquery animation problem
Posted: Thu Jun 28, 2007 2:32 pm
Hi all. I'm using jquery to load a page based on which link in the navbar the user clicks on:
This works, except that if you click on the link, the script hides #body, then updates it, then nothing. If you click the link again, it shows the new information. Obviously, I don't want the user to have to click the link twice. I tried adding alerts to help debug, and I found that if you add an alert("whatever") between the load and show commands, the script works, but I don't want to have it alert the user when he/she clicks it either. Any ideas on how to fix this would be much appreciated.
Code: Select all
$(function(){
$('.navBar a').click(function(){
$('#body').hide('normal');
$('#body').load(this.href,{ajax:true});
$('#body').show('normal');
return false;
});
});