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, 2022 in Other DevOps Questions by Kichu
• 19,040 points
2,952 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,240 points
1,190 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,840 points
2,701 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,120 points
501 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, 2022 in Other DevOps Questions by Bhavitha
• 1,000 points
701 views
0 votes
1 answer

Bootstrap throws Uncaught Error: Bootstrap's JavaScript requires jQuery

Try this Change the order of files it ...READ MORE

answered Jun 10, 2022 in JQuery by gaurav
• 23,260 points
639 views
0 votes
0 answers

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

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

May 10, 2022 in JQuery by Kichu
• 19,040 points
5,448 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, 2022 in Web Development by rajatha
• 7,680 points
2,631 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, 2022 in Web Development by rajatha
• 7,680 points
1,796 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