PERFECT!  That helps me out quite a bit since I didn't really know the
syntax on JQuery conditional statements.

On Aug 3, 10:26 am, spinnach <[EMAIL PROTECTED]> wrote:
> try it like this, .is() returns true or false so you have to use it in
> an if statement:
>
> $("a.saveConfig").click(function() {
>    if ($('div.detail').is(':visible')) alert('Hey this works');
>
> });
>
> dennis.
>
> Pete wrote:
> > I'm trying to create a link that when clicked will produce an alert if
> > there are any visible divs (all .detail divs are hidden by default).
> > I have the following function but it doesn't seem I'm doing it
> > correctly; nothing happens regardless of the visibility status of the
> > divs.
>
> > $("a.saveConfig").click(function() {
> >                    $('div.detail').is(':visible'), (function () {
> >                    alert('Hey this works');
>
> >             });
> >      });
>
> > Is there a better way to do an if statement using JQuery selectors or
> > is there something I'm missing in my code?

Reply via email to