Question

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

Was it helpful?

Solution

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();
        }
    });
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top