it is late and this is probably a very simple fix, i have seen several posts her on stackoverflow covering this, but i cant seem to get this to work right now.
To the case, i have a select with 7 options. All options have a number from 1 to 7 in their value fiels.
html
<select id="thecase" name="thecase">
<option value="1">Velg hva saken gjelder:</option>
<option value="2">Transportskade</option>
<option value="3">Stengt bestilling</option>
<option value="4">Finansiering</option>
<option value="5">Ros & ris</option>
<option value="6">Bedrift</option>
<option value="7">Annet</option>
</select>
javaScript
var hiddenOpt = jQuery("#option_other");
var target = jQuery('#thecase');
var caseVal = target.val();
hiddenOpt.hide();
target.change(function(){
alert (caseVal);
if (target == 'annet') {
hiddenOpt.show();
};
});
When i try this bit of code it returns value 1 no mather what. Here is a fiddle: http://jsfiddle.net/Danbannan/QM2U8/
Could someone explain to me what i am missing? Thanks in advance.