0

jQuery中有slideUp()、slideDown()和slideToggle()函数。但是为什么不增加slideLeft()、slideRight()、slideTopLeftCorner()、slideTopRightCorner()等函数呢?反正有没有像我的假设那样做。

4

1 回答 1

1

你可以这样使用:

$(this).hide("slide", { direction: "left" }, 1000);
$(this).show("slide", { direction: "left" }, 1000);

这是重复的

是通过插件

从右下角到左上角试试。以另一种方式 - 您可以在函数中更改选项 marginLeft 和 marginTop。

jQuery.fn.blindLeftTopOut = function (duration, easing, complete) {
    return this.animate({
        marginLeft: -this.outerWidth(),
        marginTop:  -this.outerHeight()
    }, jQuery.speed(duration, easing, complete));
};
$(element).blindLeftTopOut();
于 2013-06-23T08:32:15.623 回答