This below is a snippet from the code that I am working on. The short version of this is when a radio button with a label of NO is NOT checked, then the details textbox will show. I simply want to add another condition which allows the box to be shown IF another label is checked.
Example: IF ‘NO’ OR ‘HOW MANY PEOPLE’ are checked, then show the textbox.
I have been trying using the pipes but to no success.
if ($this.siblings('label').text() != 'No') {
if ($this.is(':checked')) {
$details.show();
$prompt.hide();
}
}
Thanks to anyone in advance, I know this is a simple question Im just a bit stuck!
Use an OR boolean :
In your case, you were doing an AND boolean (which is coded in javascript by &&)
More info on javascript booleans here : http://www.quirksmode.org/js/boolean.html
Max