开发者

jQuery Fade a div off the screen

开发者 https://www.devze.com 2022-12-22 21:46 出处:网络
In my app, I开发者_如何转开发 have a temporary div that is shown each time the app is saved (see markup below). I\'m using jQuery 1.4.2 and would like to know the command that will fade this div off t

In my app, I开发者_如何转开发 have a temporary div that is shown each time the app is saved (see markup below). I'm using jQuery 1.4.2 and would like to know the command that will fade this div off the screen after 3 seconds...

<script src="../wp-content/themes/mytheme/jquery-1.4.2.min.js" type="text/javascript"></script>
if ($_REQUEST['saved']) echo '<div id="message" class="updated fade"><p>'.$themename.' settings saved.</strong></p></div>';


jQuery's fadeOut() should do the job.

http://api.jquery.com/fadeOut/

$('#message').delay(3000).fadeOut();
0

精彩评论

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