Dave Methvin wrote:
>> I use $(".rounded").fadeOut(900) to nicely fade out
>> some elements.This is wrapped in a setTimeout()
>> thing so that it happens after 10 seconds.
> 
> Looks like seven seconds, but anyway, you can use :visible in the selector
> to avoid the each:
> 
>    window.setTimeout(function() {
>       $(".rounded:visible").fadeOut(900);
>    }, 1000*7);
Thanks a lot! It works perfectly.

> 
> If you can narrow down the selector a bit more (like div.rounded) it would
> be more efficient. The way it is now, it will have to look at every element
> in document.body to determine whether they are in the rounded class. That
> ain't cheap on a big page.
> 
I didn't know. I can be more specific and have now put $("div.rounded") 
instead.

-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to