Bootstrap TypeError modal is not a function

0 votes

When I call  bootstrap modal from jquery I get this error:

TypeError: $(...).modal is not a function

My code :

<button id="btnTest" class="btn btn-default">Show Modal</button>
<div id="dummyModal" role="dialog" class="modal fade">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" data-dismiss="modal" class="close">&times;</button>
          <h4 class="modal-title">Error</h4>
        </div>
        <div class="modal-body">
          <p>Quick Brown Fox Jumps Over The Lazy Dog</p>
        </div>
        <div class="modal-footer">
          <button type="button" data-dismiss="modal" class="btn btn-default">Close</button>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript" src="/js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="/js/bootstrap.js"></script>
<script type="text/javascript">
  $('document').ready(function () {
    $('#btnTest').click(function () {
        $('#dummyModal').modal('show');
    });
  });
</script>

Can someone help me to bypass this issue?

May 1 in Other DevOps Questions by Kichu
• 19,040 points
1,486 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Other DevOps Questions

0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,230 points
588 views
0 votes
1 answer

Is CCNA a big plus while applying for a DevOps job because networking knowledge comes in handy?

Hii amit, Actually now a days Cloud Computing is a ...READ MORE

answered Apr 20, 2020 in Other DevOps Questions by Niroj
• 82,800 points
1,670 views
0 votes
1 answer

Who is a DevOps Engineer?

A DevOps engineer is someone who works ...READ MORE

answered Dec 13, 2021 in Other DevOps Questions by Rahul
• 2,080 points
101 views
0 votes
1 answer

Is it possible to have a link to raw content of file in Azure DevOps

Sure, here's the call for the rests: GET ...READ MORE

answered Feb 10 in Other DevOps Questions by Bhavitha
• 1,000 points
147 views
0 votes
1 answer
0 votes
0 answers

Bootstrap - Uncaught TypeError: Cannot read property 'fn' of undefined

I am using jquery, backbonejs, underscorejs, and ...READ MORE

May 10 in JQuery by Kichu
• 19,040 points
1,667 views
0 votes
1 answer

jQuery show() won't turn Bootstrap d-none class visible

When you not sure how your element ...READ MORE

answered Jun 27 in Web Development by rajatha
• 7,480 points
260 views
0 votes
1 answer

Which is faster: Using bootstrap CDN or downloaded

CDNs deliver faster loading speeds for readers. Files ...READ MORE

answered Jun 30 in Web Development by rajatha
• 7,480 points
283 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP