[jQuery] Problem getting option selected in IE7
Hello everyone!
This is my first message here, and it's about a problem I'm having
with some jquery code in IE7.
$("select#IDhoteles option").click(function(){
if( $(this).text().toUpperCase() == "HOTEL CARIBE" ) {
$("div.detallehotel")
.show()
.text("intene no funciona")
}
else {
$("div.detallehotel")
.hide()
.text("")
}
});
});
And this is the html:
<label>Hotel *</label><br />
<select id="IDhoteles" name="hoteles" class="required golfSelect"
title="IDhoteles">
<option value=""></option>
<option value="Hotel El Paso">Hotel El Paso</option>
<option value="Hotel PortAventura">Hotel PortAventura</option>
<option value="Hotel Caribe">Hotel Caribe</option>
<option value="Cualquier Hotel">Cualquier Hotel</option>
</select>
The thing is that if i select the value "Hotel Caribe", a text apears.
It looks like it's not selecting the value.
It works in Firefox but not in IE7 (couldn't check in IE6 as it
crashes as soon as I load the site)
Any idea? Thank you in advance!!!