When using bootstrap modal box, uncaught typeerror: $(…). Modal is not a function

When using bootstrap modal box, uncaught typeerror: $(…). Modal is not a function

Look at the official website code, found no error, and video source comparison also found no error

//Click the add button to pop up the add page
        $("#emp_add_modal_btn").click(function(){
            //clear form data
            
            //send ajax request to query department information and display it in the list

            // pop up the add page
            $("#empAddModal").modal({
                backdrop:false
            });
        });

It turns out that the introduction of jQuery is behind the bootstrap. Just put the JS introduction of jQuery behind the bootstrap

<script type="text/javascript" src="${APP_PATH}/static/js/jquery-1.12.4.min.js"></script>
 <link href="${APP_PATH}/static/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
 <script type="text/javascript" src="${APP_PATH}/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

Similar Posts: