Skip to main content

All Questions

985 votes
17 answers
2.5m views

How to open a Bootstrap modal window using jQuery?

I'm using Twitter Bootstrap modal window functionality. When someone clicks submit on my form, I want to show the modal window upon clicking the "submit button" in the form. <form id="myform" ...
user244394's user avatar
  • 13.4k
624 votes
16 answers
1.1m views

Passing data to a bootstrap modal

I've got a couple of hyperlinks that each have an ID attached. When I click on this link, I want to open a modal ( http://twitter.github.com/bootstrap/javascript.html#modals ), and pass this ID to the ...
Leon Cullens's user avatar
  • 12.4k
608 votes
12 answers
671k views

Bind a function to Twitter Bootstrap Modal Close

I am using the Twitter Bootstrap lib on a new project and I want for part of the page to refresh and retrieve the latest json data on modal close. I dont see this anywhere in the documentation can ...
BillPull's user avatar
  • 6,973
583 votes
29 answers
353k views

Disallow Twitter Bootstrap modal window from closing

I am creating a modal window using Twitter Bootstrap. The default behavior is if you click outside the modal area, the modal will automatically close. I would like to disable that -- i.e. not close ...
user1296175's user avatar
  • 5,881
551 votes
30 answers
1.6m views

Close Bootstrap Modal

I have a bootstrap modal dialog box that I want to show initially, then when the user clicks on the page, it disappears. I have the following: $(function () { $('#modal').modal(toggle) }); <...
Nick B's user avatar
  • 9,309
425 votes
36 answers
424k views

Select2 doesn't work when embedded in a bootstrap modal

When I use a select2 (input) in bootstrap modal, I can't type anything into it. It's like disabled? Outside the modal select2 works fine. Working example: http://jsfiddle.net/byJy8/1/ code: <!-- ...
breq's user avatar
  • 25.2k
371 votes
16 answers
657k views

What is the easiest way to disable/enable buttons and links (jQuery + Bootstrap)

Sometimes I use anchors styled as buttons and sometimes I just use buttons. I want to disable specific clicky-things so that: They look disabled They stop being clicked How can I do this?
biofractal's user avatar
  • 19.1k
358 votes
28 answers
875k views

How to hide Bootstrap modal with javascript?

I've read the posts here, the Bootstrap site, and Googled like mad - but can't find what I'm sure is an easy answer... I have a Bootstrap modal that I open from a link_to helper like this: <%= ...
jvillian's user avatar
  • 20.2k
314 votes
13 answers
671k views

Confirm deletion in modal / dialog using Twitter Bootstrap?

I have an HTML table of rows tied to database rows. I'd like to have a "delete row" link for each row, but I would like to confirm with the user beforehand. Is there any way to do this using the ...
SWL's user avatar
  • 3,844
291 votes
8 answers
123k views

How do I bind Twitter Bootstrap tooltips to dynamically created elements?

I'm using Twitter bootstrap tooltips with javascript like the following: $('a[rel=tooltip]').tooltip(); My markup looks like this: <a rel="tooltip" title="Not implemented" class="btn"><i ...
durden2.0's user avatar
  • 9,462
285 votes
17 answers
329k views

twitter bootstrap typeahead ajax example

I'm trying to find a working example of the twitter bootstrap typeahead element that will make an ajax call to populate it's dropdown. I have an existing working jquery autocomplete example which ...
emeraldjava's user avatar
  • 11.1k
284 votes
10 answers
441k views

The data-toggle attributes in Twitter Bootstrap

What does data-toggle attributes do in Twitter Bootstrap? I couldn't find an answer in Bootstrap API. I have seen a similar question before as well, link. But it didn't help me much.
user avatar
275 votes
46 answers
539k views

Reset select2 value and show placeholder

How do I set the placeholder on value reset by select2. In my example If locations or grade select boxes are clicked and my select2 has a value than the value of select2 should reset and show the ...
fefe's user avatar
  • 8,995
274 votes
6 answers
375k views

Best way to disable button in Twitter's Bootstrap [duplicate]

I am confused when it comes to disabling a <button>, <input> or an <a> element with classes: .btn or .btn-primary, with JavaScript/jQuery. I have used a following snippet to do that:...
user avatar
265 votes
22 answers
179k views

Twitter bootstrap remote modal shows same content every time

I am using Twitter bootstrap, I have specified a modal <div class="modal hide" id="modal-item"> <div class="modal-header"> <button type="...
Dhruv Kumar Jha's user avatar

15 30 50 per page
1
2 3 4 5
1831