jQuery autohide element after 5 seconds

前端 未结 8 1391
刺人心
刺人心 2020-11-29 17:53

Is it possible to automatically hide an element in a web page 5 seconds after the form loads using jQuery?

Basically, I\'ve got

8条回答
  •  既然无缘
    2020-11-29 18:43

    I think, you could also do something like...

    setTimeout(function(){
        $(".message-class").trigger("click");
    }, 5000);
    

    and do your animated effects on the event-click...

    $(".message-class").click(function() {
        //your event-code
    });
    

    Greetings,

提交回复
热议问题