0

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.

Wondering
  • 4,950
  • 22
  • 71
  • 90

1 Answers1

5
if ($myRows.is(':hidden')) ...
just somebody
  • 18,602
  • 6
  • 51
  • 60