modal function not working on bootstrap 4.0.0-beta
See original GitHub issueTypeError: $(…).modal is not a function error after implementing the modal feature on bootstrap 4.0.0-beta
- jquery with bootsrap loading sequence has been checked, everything is loading well
- jquery version 3.1.1
$("#clickme").click(function (e) {
e.preventDefault;
$('#exampleModal').modal('show')
})
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">New message</h5>
<button type="button" class="close" data-dismiss="modal" aria-la bel="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="recipient-name" class="form-control-label">Recipient:</label>
<input type="text" class="form-control" id="recipient-name" value="rsdftrtytrere">
</div>
<div class="form-group">
<label for="message-text" class="form-control-label">Message:</label>
<textarea class="form-control" id="message-text">dffgffgddssfdghjgfd</textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Send message</button>
</div>
</div>
</div>
</div>
<a href="#" id="clickme" class="btn btn-primary">Stock Category</a>
- i fixed the issue by copying out the loaded bootstrap js and css file on bootstrap website for it to work
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Why does my modal not work? Bootstrap4 - Stack Overflow
I literally copy and paste from the Bootstrap 4 website (http://v4-alpha.getbootstrap.com/components/modal/#live-demo) Also, I have added js that they say.
Read more >Modal not working - Bootstrap Studio Help
It is a play project that has an 'Add Post' button which when I click, a Modal form should appear. The problem is...
Read more >Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >Modal · Bootstrap v5.2
You'll likely run into issues when nesting a .modal within another fixed element. ... Toggle a working modal demo by clicking the button...
Read more >Bootstrap 4.0.0-beta modal won't work. Popper.js is breaking
I am creating a button to open up a modal when clicked. <--Modal trigger--> <button type="button" data-toggle="modal" data-target="#myModal">Create a new ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I encountered this error too using bootstrap 4.0-beta.2 and popper 1.12.6. To solve the issue, I have to use this declaration:
window.Popper = require('popper.js');not justrequire('popper.js');I don’t see any issue here, you just have to be sure you loaded Bootstrap after jQuery and Popper.js that’s all 👍