This .show and .hide works great in Firefox 3 but not in IE 7. When I click < in the list in IE the span hides but does not show again when I select Between again.
Am I doing something wrong?
<select id="lst" onchange="onselectchange();">
<option>Between</option>
<option><</option>
</select>
<span id="spanAnd">And</span>
<script type="text/javascript">
function onselectchange() {
var lst = document.getElementById('lst');
var sp = document.getElementById('spanAnd');
if (lst.value == 'Between') {
$('#spanAnd').show();
}
else {
$('#spanAnd').hide();
}
}
</script>
EDIT: I tried onclick and onchange.