javascript - using .css('display')=="none" in Internet Explorer -


i'm trying test something's visibility with

$(this).css('display')=="none"; 

the problem is, works in chrome, ff...but not in ie. i've tried ie 8 , 9 far.

does know work around? frustrating bunch of people still use ie , don't want lose bunch of people.

use $(this).is(":visible") cross-browser solution.

from docs:

elements considered visible if consume space in document. visible elements have width or height greater zero.

elements visibility: hidden or opacity: 0 considered visible, since still consume space in layout.

read more: http://api.jquery.com/visible-selector/ , how tell if element visible


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -