jQuery show for 5 seconds then hide

前端 未结 3 516
孤城傲影
孤城傲影 2020-12-07 07:37

I\'m using .show to display a hidden message after a successful form submit.

How to display the message for 5 seconds then hide?

3条回答
  •  Happy的楠姐
    2020-12-07 08:17

    You can use the below effect to animate, you can change the values as per your requirements

    $("#myElem").fadeIn('slow').animate({opacity: 1.0}, 1500).effect("pulsate", { times: 2 }, 800).fadeOut('slow'); 
    

提交回复
热议问题