jQuery实现slideRightShow()方法

//jQueryx 实现slideLeft 和slideRight方法
$.fn.slideLeftHide = function(speed, callback) {
    this.animate({
        width: "hide",
        paddingLeft: "hide",
        paddingRight: "hide",
        marginLeft: "hide",
        marginRight: "hide"
    }, speed, callback);
};
$.fn.slideRightHide = function(speed, callback) {
    this.animate({
        width: "hide",
        paddingRight: "hide",
        paddingLeft: "hide",
        marginRight: "hide",
        marginLeft: "hide"
    }, speed, callback);
};
$.fn.slideLeftShow = function(speed, callback) {
    this.animate({
        width: "show",
        paddingLeft: "show",
        paddingRight: "show",
        marginLeft: "show",
        marginRight: "show"
    }, speed, callback);
};

//右滑动显示
$.fn.slideRightShow = function(speed, callback) {
    this.animate({
        width: "show",
        paddingRight: "show",
        paddingLeft: "show",
        marginRight: "show",
        marginLeft: "show"
    }, speed, callback);
}
posted @ 2015-12-10 21:16  coding不止步  阅读(940)  评论(0编辑  收藏  举报