[jQuery] .size() to test if something exists

[jQuery] .size() to test if something exists

Currently my code looks something like this:
if ($('#warningmsg').size()) highlightWarningMsg();
Is that the "correct" way of testing if a jQuery object contains anything?
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/