Discussion.
Subject: Re: [jQuery] make a div disappear after 2seconds?
Well, I was /thinking about/ suggesting it, but I always feel a little funny
about the self-promotion thing. ;-)
Cheers,
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com
] On Behalf Of Karl Swedberg
Sent: Wednesday, January 24, 2007 7:35 AM
To: jQuery Discussion.
Subject: Re: [jQuery] make a div disappear after 2seconds?
Well, I was /thinking about/ suggesting it, but I always feel a little funny
about the self-promotion thing. ;-)
Cheers,
--Karl
Nate Cavanaugh wrote:
To steal an idea from
http://www.learningjquery.com/2007/01/effect-delay-trick
$(div).animate({opacity: 1.0}, 1000).hide('fast');
Nice little hack :)
Yeah cool!
I've used the also very cool pause plugin for that...:
$('div').pause(5000, 'fx').fadeOut('normal');
Well, I was /thinking about/ suggesting it, but I always feel a
little funny about the self-promotion thing. ;-)
Cheers,
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jan 23, 2007, at 9:03 PM, Ⓙⓐⓚⓔ wrote:
I was wondering why nobody suggested that!
Hi,
should be a simple question but its been doing my heading for 1 day now!!
how can i make a div disappear after 2 seconds ?
thanks
T
--
View this message in context:
http://www.nabble.com/make-a-div-disappear-after-2seconds--tf3077754.html#a8550789
Sent from the JQuery mailing list
try using setTimeout, like this:
setTimeout($('.selector').hide(),2000); // 2000 = 2 seconds
Be sure to put your command in quotes.
On 1/23/07, ronaldo [EMAIL PROTECTED] wrote:
Hi,
should be a simple question but its been doing my heading for 1 day now!!
how can i make a div disappear
You could use window.setTimeout like this:
window.setTimeout(function() {
$('#theDIV').hide();
}, 2000);
The setTimeout method takes a function and the time to delay in milliseconds.
--
Brandon Aaron
On 1/23/07, ronaldo [EMAIL PROTECTED] wrote:
Hi,
should be a simple question but its
$(document).ready(function() {
setTimeout(divDisappear(), 2000);
});
function divDisappear() {
$('div#id').hide();
}
-roso
ronaldo wrote:
Hi,
should be a simple question but its been doing my heading for 1 day now!!
how can i make a div disappear after 2 seconds ?
thanks
T
[EMAIL PROTECTED] schrieb:
$(document).ready(function() {
setTimeout(divDisappear(), 2000);
});
function divDisappear() {
$('div#id').hide();
}
Those should be equivalent:
$(function() {
setTimeout($('div#id').hide(), 2000);
});
Or:
$(function() {
To steal an idea from
http://www.learningjquery.com/2007/01/effect-delay-trick
$(div).animate({opacity: 1.0}, 1000).hide('fast');
Nice little hack :)
ronaldo wrote:
Hi,
should be a simple question but its been doing my heading for 1 day now!!
how can i make a div disappear after 2
I was wondering why nobody suggested that!
I would have done the hide inside the callback though!
On 1/23/07, Nate Cavanaugh [EMAIL PROTECTED] wrote:
To steal an idea from
http://www.learningjquery.com/2007/01/effect-delay-trick
$(div).animate({opacity: 1.0}, 1000).hide('fast');
Nice
ronaldo wrote:
should be a simple question but its been doing my heading for 1 day now!!
how can i make a div disappear after 2 seconds ?
Why not just:
setTimeout(function() { $(div).hide() }, 2000);
-- Dossy
--
Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/
Panoptic
it works! but it doesn't keep the chain going!
On 1/23/07, Dossy Shiobara [EMAIL PROTECTED] wrote:
ronaldo wrote:
should be a simple question but its been doing my heading for 1 day now!!
how can i make a div disappear after 2 seconds ?
Why not just:
setTimeout(function() {
13 matches
Mail list logo