tags:

views:

54

answers:

2

Hi All, I have one functionality where I am hiding few rows of a table on pageload.After that on click of a span, I am calling the toggle() to dispaly and hide rows in alternate click.Now I need to do some additional work after the toogle(), for that I am doing one check

            $myRows.toggle();

            if ($myRows.css('display') === 'none') {
               //my code
            }
            else {
                     //mycode
                   }

Now can I have some better checking instead of if ($myRows.css('display') === 'none'), its working fine, but can I go for any better condition checking.

+4  A: 
if ($myRows.is(':hidden')) ...
just somebody
+1  A: 

SO Post: How do you test if something is hidden in jQuery?

o.k.w
thanks for the link.
Wondering