开发者

redirect to a url after sliding up content

开发者 https://www.devze.com 2023-03-22 07:39 出处:网络
I have this code: $(\".removeall\").dblclick(function () { $(this).parent().slideUp(); });开发者_运维技巧

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

精彩评论

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

关注公众号