开发者

toggle + fadein

I have a jquery function to toggle a div class, is it possible to have the "toggle" combined with a "fadein" effect?

function showDiv() {
    $("#mydiv").animate({
        "height": "toggle"
    }, {
        duration: 300
    })
}

Any help would be appre开发者_Go百科ciated


I would take a look at: .fadeToggle()


$("#mydiv").animate({
        "height": "toggle"
    }, {
        duration: 300
    }, function(){
        $("#mydiv").fadeIn();
    }).
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜