Link to home
Start Free TrialLog in
Avatar of Loganathan Natarajan
Loganathan NatarajanFlag for India

asked on

how to get visible status of anchor tag using Jquery

Hi,
I have code like this, on some conditions I make the link visible=false,visible=true in code.
I need to get the visible status of the anchor control in Jquery. I have tried could not get any solution.

   <ul runat="server" id="menubar">
        <li><a href="~/test" id="mnuTest" runat="server">Test</a></li>
        <li><a href="~/test1" id="mnuTest1" runat="server">Test1</a></li>
      </ul>
Avatar of Ishaan Rawat
Ishaan Rawat
Flag of India image

Try this...
if( $('a').is(':visible') ) {
    // it's visible, do something
}
else {
    // it's not visible so do something else
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jagadishwor Dulal
Jagadishwor Dulal
Flag of Nepal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial