Show div after 10 secs and hide after 10 secs

后端 未结 6 1424
[愿得一人]
[愿得一人] 2021-01-17 07:04

I need to show a div (e.g. #mybox) in 10secs after page load, keep it visible for another 10 secs and then hide with a nice sliding in/out effects.

Thanks a lot for

6条回答
  •  情话喂你
    2021-01-17 07:15

    http://jsfiddle.net/tzvemt4m/

    $(".Mask").each(function() {
      var tempstr = this.innerText;
      var replacestr = this.innerText.replace(/./g, "*");
      $(this).mouseover(function() {
        this.innerText = tempstr;
      });
      $(this).mouseout(function() {
        var tempObj = this;
        setTimeout(function() {
          tempObj.innerText = replacestr;
        }, 10000);
      });
      this.innerText = replacestr;
    });
    

提交回复
热议问题