Bttstrp / bootstrap-switch

Turn checkboxes and radio buttons in toggle switches.
MIT License
5.08k stars 1.44k forks source link

SyntaxError: expected expression, got '.' #721

Open edwolfe807 opened 4 years ago

edwolfe807 commented 4 years ago

I receive the following console error (no other errors of any kind):

SyntaxError: expected expression, got '.'bootstrap-switch.min.css:1

HTML:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
<!-- SCR Popper -->         <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<!-- SCR JQuery -->         <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- SCR Bootstrap 4 -->    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>

<!-- SCR BS4 Select -->     <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.12/dist/js/bootstrap-select.min.js"></script>
<!-- SCR BS4 Select EN -->  <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.12/dist/js/i18n/defaults-en_US.min.js"></script>
<!-- SCR BS4 Switch -->     <script src="dist/bootstrap-switch/dist/js/bootstrap-switch.js"></script>

<!-- CSS Bootstrap 4 -->    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<!-- CSS BS4 Switch -->     <script src="dist/bootstrap-switch/dist/css/bootstrap4/bootstrap-switch.min.css"></script>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <input type="checkbox" name="my-checkbox" checked>
        <script>
            $("[name='my-checkbox']").bootstrapSwitch();
        </script>
    </body>
</html>