.chained dropdown list not working in IE10

280 views Asked by At

The following code works fin in all browsers bar IE10 unless in compatibility mode. Anyone now how I can get this code to work in IE10 in normal mode?

<script type="text/javascript" src="/content/ebiz/superdrug/resources/js/chained.js">      
</script> 
<script type="text/javascript"   src="/content/ebiz/superdrug/resources/js/jquery.chained.remote.js"></script> 
<script type="text/javascript"> 
$(document).ready(function() {
    $("#stores").chained("#county");
    $("#county").bind(($.browser.msie ? "propertychange" : "change"), function(event) {
        event.preventDefault();
        if ("" != $(this).val()) {
            $("#storedropdown").fadeIn();
        } else {
            $("#storedropdown").hide();
            $("#fsbuttons").hide();
        }
    });
    $("#stores").bind(($.browser.msie ? "propertychange" : "change"), function(event) {
        event.preventDefault();
        if ("" != $(this).val()) {
            $("#fsbuttons").fadeIn();
        } else {
            $("#fsbuttons").hide();
        }
    });
});

</script>

Thanks

1

There are 1 answers

0
damian On BEST ANSWER

Can you try the following:

$(document).ready(function() {
    $("#stores").chained("#county");
    $("#county").on("change", function(event) {
        event = event || window.event;
        event.preventDefault();
        if ("" != $(this).val()) {
            $("#storedropdown").fadeIn();
        } else {
            $("#storedropdown").hide();
            $("#fsbuttons").hide();
        }
    });
    $("#stores").on("change", function(event) {
        event = event || window.event;
        event.preventDefault();
        if ("" != $(this).val()) {
            $("#fsbuttons").fadeIn();
        } else {
            $("#fsbuttons").hide();
        }
    });
});