> $(document).ready(function() {
> if (!$("#save-search div.error-message")) $("#save-search").hide();
> });
>
> Would it be possible to let me know not just how to get this to work, but
> also where I'm going wrong?
Your test will never fail because $(..) always returns an object which
does not resolve to false (even if it contains zero dom nodes). You
could rework it like this:
if (!$("#save-search div.error-message")[0]) {
// do stuff
}
This expression will test the first element in the jQuery object, and
that will resolve to false if nothing was selected.
Mike
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/