[jQuery] Re: How do you delay for a few seconds
I think a pause method would be of great use. I looked for this very thing time and time again. It would be nice to have it available. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Saturday, July 14, 2007 9:05 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How do you delay for a few seconds Some folks are lobbying for a pause(ms) method, but it's not in the code yet. There's a plugin to do what you want though; if you dig around in the thread archives for animation pause plugin you can probably find the link for the plugin. -- Josh - Original Message - From: goofy166 [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, July 14, 2007 4:52 PM Subject: [jQuery] How do you delay for a few seconds I have mastered many of the incredible features of jquery today for the first time, but for the life of me I can't figure out how in the heck you can get a div to display for a fixed amount of time then just hide itself. Sorry for such a stupid question.
[jQuery] Re: How do you delay for a few seconds
Andy Matthews wrote: I think a pause method would be of great use. I looked for this very thing time and time again. It would be nice to have it available. Here's a one liner: jQuery.fn.pause = function(ms) { return this.animate({ opacity: 1 }, ms); }; I know I know, it's still not in the core... --Klaus
[jQuery] Re: How do you delay for a few seconds
See http://www.learningjquery.com/2007/01/effect-delay-trick (it's not a stupid question btw) goofy166 wrote: I have mastered many of the incredible features of jquery today for the first time, but for the life of me I can't figure out how in the heck you can get a div to display for a fixed amount of time then just hide itself. Sorry for such a stupid question. -- View this message in context: http://www.nabble.com/How-do-you-delay-for-a-few-seconds-tf4080846s15494.html#a11602398 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: How do you delay for a few seconds
I agree, I was going to be looking for something like this. Would be nice to have a jQuery function, I'll check out that plugin On 7/15/07, jazzle [EMAIL PROTECTED] wrote: See http://www.learningjquery.com/2007/01/effect-delay-trick (it's not a stupid question btw) goofy166 wrote: I have mastered many of the incredible features of jquery today for the first time, but for the life of me I can't figure out how in the heck you can get a div to display for a fixed amount of time then just hide itself. Sorry for such a stupid question. -- View this message in context: http://www.nabble.com/How-do-you-delay-for-a-few-seconds-tf4080846s15494.html#a11602398 Sent from the JQuery mailing list archive at Nabble.com. -- Tane Piper http://digitalspaghetti.tooum.net This email is: [ ] blogable [ x ] ask first [ ] private
[jQuery] Re: How do you delay for a few seconds
it's not a plugin, much simpler than that. just a matter of including .animate({opacity: 1.0}, 3000) or similar in a chain. (the opacity is faded from 1 to 1 over 3 seconds, hence no visible change over that time) Tane Piper wrote: I agree, I was going to be looking for something like this. Would be nice to have a jQuery function, I'll check out that plugin On 7/15/07, jazzle [EMAIL PROTECTED] wrote: See http://www.learningjquery.com/2007/01/effect-delay-trick (it's not a stupid question btw) goofy166 wrote: I have mastered many of the incredible features of jquery today for the first time, but for the life of me I can't figure out how in the heck you can get a div to display for a fixed amount of time then just hide itself. Sorry for such a stupid question. -- View this message in context: http://www.nabble.com/How-do-you-delay-for-a-few-seconds-tf4080846s15494.html#a11602398 Sent from the JQuery mailing list archive at Nabble.com. -- Tane Piper http://digitalspaghetti.tooum.net This email is: [ ] blogable [ x ] ask first [ ] private -- View this message in context: http://www.nabble.com/How-do-you-delay-for-a-few-seconds-tf4080846s15494.html#a11602449 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: How do you delay for a few seconds
Some folks are lobbying for a pause(ms) method, but it's not in the code yet. There's a plugin to do what you want though; if you dig around in the thread archives for animation pause plugin you can probably find the link for the plugin. -- Josh - Original Message - From: goofy166 [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, July 14, 2007 4:52 PM Subject: [jQuery] How do you delay for a few seconds I have mastered many of the incredible features of jquery today for the first time, but for the life of me I can't figure out how in the heck you can get a div to display for a fixed amount of time then just hide itself. Sorry for such a stupid question.
[jQuery] Re: How do you delay for a few seconds
Maybe (untested): $('#myDiv').show(); setTimeout(function() { $('#myDiv').hide(); }, 5000); Where 5000 is the duration to show it for, in milliseconds (i.e., 1000 = 1 second). Hope it helps. --Erik On 7/14/07, goofy166 [EMAIL PROTECTED] wrote: I have mastered many of the incredible features of jquery today for the first time, but for the life of me I can't figure out how in the heck you can get a div to display for a fixed amount of time then just hide itself. Sorry for such a stupid question.