It has options with values true and false.
I have some jQuery here:
$("#myselect").change(function () {
var accepted = $(this)[0].value;
alert(accepted);
if(accepted == false) {
alert("Hi");
}
});
What I don’t understand is why the Hi message is never shown.
The condition in the if is always coming through false.
Could someone please help me with this I’m fairly new to jQuery.
It’s because the
value=""of aninputis a string:http://jsfiddle.net/nAteT/