4

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??

2
  • is your #windowTitleDialog an initialized bootstrap modal? If you include all your html and jQuery it will be easier to look into it for you. Commented Dec 10, 2013 at 17:06
  • I used bootstrap 3.smth and it kind of works :) Commented Dec 11, 2013 at 13:21

1 Answer 1

8

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Wow, I did the exact same thing. Thank you for answering your own question. I was completely stumped as to why it wasn't working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.