Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap modal Uncaught TypeError: Object [object Object] has no method 'modal'

Trying to work with bootstrap I am getting an error written in title

my code

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

these are the 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??

like image 491
Yebach Avatar asked Feb 15 '23 10:02

Yebach


1 Answers

I had this exact problem. The solution was quite simple after all:

It turned out, that I had included jQuery twice.

After removing the superfluous jQuery, the modal started to work as expected. So

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

actually closed the dialog.

like image 182
Codetoffel Avatar answered Apr 25 '23 15:04

Codetoffel