3

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.

  • Are there any console errors or does it just quietly not work? – shabs Aug 10 '17 at 17:50
  • It is definitely supported in IE9+ and all the other modern browsers as stated in https://github.com/Bttstrp/bootstrap-switch – Jayveer Parmar Aug 10 '17 at 18:34
  • @jParmar: just updated the original question. I tried something really simple from the main website (http://bootstrapswitch.com/) and it doesn't work on IE11 still. Not sure what is going on. – user3103493 Aug 11 '17 at 23:21
  • @user3103493: I tried it but it still shows me `Unresolved function or method bootstrapSwitch()`. There is an alternate option as you can try Bootstrap Toggle from http://www.bootstraptoggle.com/ which might help you to fulfill the functionality with web application. – Jayveer Parmar Aug 12 '17 at 04:21
  • How fixed this problem? – ultimatum Jan 03 '18 at 12:32
  • I have many users with IE11 using my code...(my solution is a Microsoft Word app, which unfortunately uses the IE11 engine when running on Windows machines so MSFT can support Windows 7 users...!!!). One user is seeing a "Object doesn't support property or method 'bootstrapToggle' error...did you ever sort out your issue? – 11teenth Aug 11 '18 at 12:35

0 Answers0