开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜