Hello. I'd like to know if there's a test conditions using which one can check the visibility state(hidden or visible) of a tag.
I mean a test condition,which could be used with the if() statement.
thanks!
Hello. I'd like to know if there's a test conditions using which one can check the visibility state(hidden or visible) of a tag.
I mean a test condition,which could be used with the if() statement.
thanks!
Simple solution is to use jQuery and do $('#id').is(':visible')
. Otherwise you'll be writing a function that doesn't work as well and isn't as nicely coded.
If you use jQuery, it's very easy:
if ($(SELECTOR).is(":visible")) {
// do amazing things
}