开发者

toggle + fadein

开发者 https://www.devze.com 2023-03-18 05:19 出处:网络
I have a jquery function to toggle a div class, is it possible to have the \"toggle\" combined with a \"fadein\" effect?

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

精彩评论

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

关注公众号