I am trying to build a script that will prevent a link from changing pages immediately and running an animation first.
This is what I have so far:
$('a').click(function(event){
event.preventDefault();
$('#nav-bar').animate({
left:'-260'
}, 1500, function(){
//want to use callback function to load the page....
$(this).attr('href') what next?
}
);
I would like to rebuild the default event and fire in the callback function. Is there an easy way to do this?
THanks
Set the
window.locationto thehref