Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deterimine if SHOW() or HIDE() - JQuery 2

Status
Not open for further replies.

JRB-Bldr

Programmer
May 17, 2001
3,281
US
I have the possibility of
Code:
$(".section.motorcycle-rv #motorcycle-rv-entry").show()
or
Code:
$(".section.motorcycle-rv #motorcycle-rv-entry").hide()

Later on in within a different bound function in the code I would like to test if the specific section is:
* hidden (.hide())
* or visible (.show())

Is there a way to do that?

Your advice and/or suggestions would be most appreciated.

Thanks,
JRB-Bldr



 
you can use the is(':hidden') or :visible property of the element to check for that.

Code:
if($(".section.motorcycle-rv #motorcycle-rv-entry")[red].is(':hidden')[/red])
{
//do something...
}

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown. 

[url=http://behindtheweb.blogspot.com/] Web & Tech [/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top