Bootstrap modal Uncaught TypeError: Object [object Object] does not have a 'modal' method

Attempting to work with download I get an error message written in the header

my code

function closeDialog () {
    $('#windowTitleDialog').modal('hide'); 
};

these are files included

  <link href="http://static.scripting.com/github/bootstrap2/css/bootstrap.css" rel="stylesheet">
  <script src="http://static.scripting.com/github/bootstrap2/js/jquery.js"></script><style type="text/css"></style>
  <script src="{{=URL(request.application,'static','js/bootstrap-transition.js')}}"></script>
  <script src="http://static.scripting.com/github/bootstrap2/js/bootstrap.js"></script>
  <script type="text/javascript"src="{{=URL(request.application,'static','js/modal.js')}}"></script>

any suggestions

+4
source share
1 answer

I had this exact problem. In the end, the solution was pretty simple:

It turned out that I turned on jQuery twice .

After removing excess jQuery, the modal started working as expected. So

$('#theModal').modal('hide')

actually closed the dialog.

+8
source

All Articles