I want to check if a element is hidden based on that i want to add a condition. I just want to use jQuery please help me with that.
I have actually a selectbox which is having id param. When it is hidden I do not want to perform any action but when it is visible and having value as country I want to show next select box containing countries.
param = $('#param').val();
if(param =='country') {//show next box}
I am not sure how to incorporate that show next box only when it is visible
In your case it’s totally different matter. What you need is such code:
You need to pass
paramas variable to the jQuery selector, then it will look for element with ID ofcountry(the value of the variable) and check if it’s visible.Edit: regarding your new edit, try such code:
This will check the value and show next box only when
paramis visible.