hi this is my click function. It works for chrome and firefox well but do anything on IE9
When i click dropdownbox dont run click function on IE9.
Script:
$('.lstKuralTipleri option').click(function() {
switch ($('.lstKuralTipleri :selected').index()) {
case 0:
$('.SartliFormatDegereGore').slideDown();
$('.SartliFormatTariheGore').slideUp();
break;
case 1:
$('.SartliFormatTariheGore').slideDown();
$('.SartliFormatDegereGore').slideUp();
break;
}
});
Aspx
<asp:ListBox style="padding-top:3px" runat="server" ID="lstKuralTipleri" CssClass="lstKuralTipleri" Width="805px">
<asp:ListItem Text="> Kolon değerine göre" Selected="True"/>
<asp:ListItem Text="> Tarihe göre"/>
</asp:ListBox>
The
clickevent on<option>isn’t standard and thus not supported in all browsers.You should use the
onchangeevent instead ofonclick.You can read all the Q&A in this search, this is the subject for all of them…
Updated code: