Possible Duplicate:
Hide select option in IE using jQuery
So as you can see below, i have two select elements. The first one has two values, 1.4 and 1.7. Depending on which option is selected i want to disable certain options in the second select element. It works perfectly fine in chrome, but IE is being a bitch (as usual!).
Any ideas what's wrong?
<p> <label style="width: 155px; display: inline-block;">Height</label> <select name="height"> <option value="1.4">1.4</option> <option value="1.7">1.7</option> </select> </p> <p> <label style="width: 155px; display: inline-block;">Amount</label> <select name="slanor"> <option class="four" value="2">2</option> <option class="four seven" value="3">3</option> <option class="seven" value="4">4</option> </select> </p> <script> $(document).ready(function() { check(); $('select[name=height]').change(function() { check(); }); function check() { var slanor = $('select[name=slanor]'); var currHeight = $('select[name=height]').val(); if(currHeight == '1.4') { slanor.find('option').hide(); slanor.find('.four').show(); } else { slanor.find('option').hide(); slanor.find('.seven').show(); } } }); </script>
console.log(currHeight)to find out.)