redirect to a url after sliding up content
I have this code:
$(".removeall").dblclick(function () {
$(this).parent().slideUp();
});开发者_运维技巧
What I want to happen now, using jquery, is to redirect to main.php after this is done
This should do the trick:
$(".removeall").dblclick(function(){
// The slideUp function takes two parameters, a 'speed' for the animation, and
// a callback method to be called once the animation is done.
$(this).parent().slideUp("fast", function(){
window.location = "/main.php";
});
});
You can read more about the slideUp method here.
精彩评论