jimfog Posted June 10, 2015 Share Posted June 10, 2015 Suppose I have a page with some input elements...some are disabled some other are non-visible. What conditional should I write to test for the above case...based on this fact I want to perform an action. Saying it with another words....how am I going to test that the page DOES NOT have visible and non-disabled input elements An example https://jsfiddle.net/fiddlehunt/weveks9f/32/ ...one input is disabled and the other is hidden. I tried to use the code in line 32 but it does not test for that.... Link to comment Share on other sites More sharing options...
Alatoru Posted June 10, 2015 Share Posted June 10, 2015 Look at this: http://w3schools.invisionzone.com/index.php?showtopic=42096 Link to comment Share on other sites More sharing options...
dsonesuk Posted June 10, 2015 Share Posted June 10, 2015 Combine :disabled and :hidden together (not ! :visible), it will give a AND condition effect. for example if($('.time').is(':disabled:hidden')){///carry out code} Link to comment Share on other sites More sharing options...
jimfog Posted June 23, 2015 Author Share Posted June 23, 2015 Combine :disabled and :hidden together (not ! :visible), it will give a AND condition effect. for example if($('.time').is(':disabled:hidden')){///carry out code} Yes that seems to be the solution...thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now