Bootstrap Switch not working on IE11?

Viewed 1335

I can't seem to get my Bootstrap Switch to work in IE11, however it works for Chrome and Edge. Here is the HTML snippet:

<input type="checkbox" id="myCheckbox" name="myCheckbox">
<label>Turn this on or off!</label

And here is my JS:

<script>
    $(document).read(function () {
        $('myCheckbox').bootstrapSwitch();
    };
</script>

Here is a Chrome screentshot:

enter image description here

And an IE screenshot:

enter image description here

Any idea on what's going on here? Is there a simple fix for this or does IE11 not support Bootstrap Switches?

Update: I now have made a separate index.html file just to test this. I downloaded the latest version of bootstrap, bootstrap switch, and jquery. My file has the following code:

<html>
    <head>
        <link href="bootstrap.css" rel="stylesheet">
        <link href="boostrap-switch.css" rel="stylesheet">
        <script src="jquery.js"></script>
        <script src="bootstrap-switch.js"></script>
    </head>
    <body>
        <h1>Hello!</h1>
        <input type="checkbox" name="myCheckbox" checked>
        <script>
            $("[name='myCheckbox']").bootstrapSwitch();
        </script>
    </body>
</html>

This is literally pretty much the tutorial for using the switch from the bootstrap switch website (I'd link but this site won't let me link more than 2 links until I have a higher reputation). Still doesn't work on IE11, works fine on Chrome.

0 Answers
Related