[jQuery] Detecting the selected option
I have a button (#showgraph) that submits a form, but when this
happens, I want a certain div (#overlaybutt) to appear only if a
certain value ('no') is present in one of the select options
(#initCond).
Here's what I have so far, which isn't working:
$("#showgraph").click(function(){
// Only unhide the Overlay controls if Initial Conditions are set
to No.
$("#initCond").change(function() {
if (this.value == 'no')
{
$("#overlaybutt").show("slow");
}
return false;
});
return false;
});
How would I show #overlaybutt only if the value of the #initCond
select box is set to 'no'?
Thanks!