Skip to main content

Questions tagged [bootstrap-modal]

Bootstrap provides a JavaScript-powered dialog element that can be used to replace native dialogs (to a degree); unlike native dialogs, Bootstrap modals cannot block the flow of execution.

bootstrap-modal
294 votes
21 answers
1.1m views

Launch Bootstrap Modal on Page Load

I don't know JavaScript at all. The Bootstrap documentation says to Call the modal via JavaScript: $('#myModal').modal(options) I have no clue how to call this on a page load. Using the supplied ...
Brandon's user avatar
  • 3,069
193 votes
33 answers
301k views

Vertically centering Bootstrap modal window

I would like to center my modal on the viewport (middle) I tried to add some css properties .modal { position: fixed; top:50%; left:50%; } I'm using this example http://jsfiddle.net/rniemeyer/...
user2613813's user avatar
  • 1,971
163 votes
17 answers
523k views

Bootstrap modal: is not a function

I have a modal in my page. When I try to call it when the windows load, it prints an error to the console that says : $(...).modal is not a function This is my Modal HTML : <div class="modal ...
godheaper's user avatar
  • 1,775
136 votes
2 answers
148k views

What's the tabindex="-1" in bootstrap for

What's the tabindex attribute in Bootstrap 3 for? Its documentation doesn't say anything about them although they use them practically in all modals. I've only find this regarding its use, which doesn'...
Alvaro's user avatar
  • 41.4k
108 votes
9 answers
264k views

Capture close event on Bootstrap Modal

I have a Bootstrap Modal to select events. If the user clicks on the X button or outside the modal, I would like to send them to the default event. How can I capture these events? This is my HTML ...
user avatar
85 votes
14 answers
68k views

iOS 11 Safari bootstrap modal text area outside of cursor

With iOS 11 safari, input textbox cursor are outside of input textbox. We did not get why it is having this problem. As you can see my focused text box is email text input but my cursor is outside of ...
kekkeme's user avatar
  • 942
83 votes
14 answers
143k views

Can I check if Bootstrap Modal Shown / Hidden?

Can I check if Bootstrap Modal currently Shown / Hidden Programatically? Like bool a = if("#myModal").shown(); ? I need true/false
user2736812's user avatar
  • 1,311
77 votes
12 answers
100k views

Autocomplete issue into bootstrap modal

I have a display problem in the jQuery autocomplete inside a modal dialog bootstrap. When I mouse scroll, the results do not remain attached to the input. Is there a way to solve this? Here ...
Lughino's user avatar
  • 4,100
76 votes
14 answers
179k views

Modal width (increase)

I want a modal to be 80% or so of a screen width. modal-lg isn't large enough. This: .modal .modal-dialog { width: 80%; } Doesn't work with Bootstrap 4.
Oleg Antonyan's user avatar
76 votes
7 answers
152k views

Set textarea width to 100% in bootstrap modal

Was trying all possible ways, but never succeeded: <div style="float: right"> <button type="button" value="Decline" class="btn btn-danger" data-toggle="modal" data-target="#...
Bartosz's user avatar
  • 4,592
75 votes
25 answers
216k views

Bootstrap close modal not working

I have two button here that are being used to close the modal. The first is the close icon and the other one is cancel button, both use data-dismiss to close the modal. However, both of them are not ...
NoorUllah's user avatar
  • 761
72 votes
16 answers
132k views

React: ResizeObserver loop completed with undelivered notifications

I'm seeing the following error when I dismiss a particular modal: This didn't happen when I was using react-router v5, but I've recently updated to v6 due to other requirements and it started ...
rjray's user avatar
  • 6,463
70 votes
10 answers
373k views

In Bootstrap open Enlarge image in modal

How do I open / enlarge an image in a modal using jquery / js and not data attributes? Anytime a user inserts an image into a content editor I need it to be clickable to expand in a modal with js, ...
Jibes's user avatar
  • 935
66 votes
4 answers
101k views

How can I use Bootstrap modals without loading the entire library?

I'm integrating my Modal from Bootstrap with another site that doesn't use it. I see that bootstrap lets you separate the Javascript for each component. But what about the CSS? If I link to bootstrap....
mdundas's user avatar
  • 789
60 votes
8 answers
316k views

Confirm deletion using Bootstrap 3 modal box

I need to confirm deletion using Bootstrap 3 modal box (YES/NO). How can I create this? HTML code: <form action="blah" method="POST"> <button class='btn' type="submit" name="...
Pink Code's user avatar
  • 1,824

15 30 50 per page
1
2 3 4 5
517