Twitter Bootstrap modal doesn't work


Baig:

I am new to Twitter Bootstrap. I am using the modal panel and it is not showing. It fades the screen, but the modal itself doesn't appear. I have checked the error console and there are no errors.

My code is inside the <head>tag; I include the following script:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $ruadmin ?>js/bootstrap.js"></script>
<script src="<?php echo $ruadmin ?>js/tablesorter/jquery.tablesorter.js"></script>
<script src="<?php echo $ruadmin ?>js/tablesorter/tables.js"></script>

Mode page:

<a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Welcome</h3>
  </div>
  <div class="modal-body">
    <p> Hello </p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <button class="btn btn-primary">Save changes</button>
  </div>
</div>
André Junge:

You need to use data-targettags.

Try replacing the href="#myModal"attribute with data-target="#myModal". Also, you hidetook a class and I guess it shouldn't be there.

see example here

Related


Twitter Bootstrap modal doesn't work

Baig: I am new to Twitter Bootstrap. I am using the modal panel and it is not showing. It fades the screen, but the modal itself doesn't appear. I have checked the error console and there are no errors. My code is inside the <head>tag; I include the following

Twitter bootstrap modal doesn't work

Baig I am new to Twitter Bootstrap. I am using the modal panel and it is not showing. It fades the screen, but the modal itself doesn't appear. I checked the error console and there are no errors. My code is inside the <head>tag; I include the following script

JavaScript doesn't work with Twitter Bootstrap modal

Thomas Lin I'm trying to implement some javascript using twitter bootstrap's modal which works fine on jsFiddle but doesn't work on my site . HTML: <a href="#Modal1" class="link-glow" data-toggle="modal">link</a> <div class="modal fade" id="Modal1" tabindex="

Twitter Bootstrap modal doesn't work

Baig: I am new to Twitter Bootstrap. I am using the modal panel and it is not showing. It fades the screen, but the modal itself doesn't appear. I have checked the error console and there are no errors. My code is inside the <head>tag; I include the following

JavaScript doesn't work with Twitter Bootstrap modal

Thomas Lin I'm trying to implement some javascript using twitter bootstrap's modal which works fine on jsFiddle but doesn't work on my site . HTML: <a href="#Modal1" class="link-glow" data-toggle="modal">link</a> <div class="modal fade" id="Modal1" tabindex="

Twitter-bootstrap modal doesn't work with angular

Milan Panic I'm trying to implement bootstrap mode in angular 7 but the mode is not working. In my angular.jsonscript file I include jquery.min.jsand in this order bootstrap.min.js. my component.html: <button type="button" class="catalogue-button btn btn-prima

Passing php variable to modal twitter bootstrap doesn't work

Jayson Lacson Hi I am passing php variable to twitter boostrap modal. But I can't get the correct ID when clicking on the link inside the modal. See code below. First I created a foreach function where I have the data loop, second I created a link to show the

Twitter-bootstrap modal doesn't work with angular

Milan Panic I'm trying to implement bootstrap mode in angular 7 but the mode is not working. In my angular.jsonscript file I include jquery.min.jsand in this order bootstrap.min.js. my component.html: <button type="button" class="catalogue-button btn btn-prima

Twitter-bootstrap modal doesn't work with angular

Milan Panic I'm trying to implement bootstrap mode in angular 7 but the mode is not working. In my angular.jsonscript file I include jquery.min.jsand in this order bootstrap.min.js. my component.html: <button type="button" class="catalogue-button btn btn-prima

Bootstrap modal doesn't work

curt.jpeg I have a frustrating problem. My modal cannot be opened. I have a "localhost:8888/book/#rollrModal" white box in the bottom left of my browser, and that's it. and no console warnings etc. Here is the JSFiddle with the relevant code: https://jsfiddle.

Bootstrap modal doesn't work

curt.jpeg I have a frustrating problem. My modal cannot be opened. I have a "localhost:8888/book/#rollrModal" white box in the bottom left of my browser, and that's it. and no console warnings etc. Here is the JSFiddle with the relevant code: https://jsfiddle.

Modal bootstrap doesn't work

Zor I put the live demo into a new page : <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> Launch demo modal </button> <div class="modal fade"> <div class="modal-dialog"> <div class="modal-content">

Bootstrap modal doesn't work

Timo I'm trying to get a modal from bootstrap, but for some reason it's showing like this: This is the default code I use from the bootstrap documentation: <!-- Button trigger modal --> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" d

Bootstrap modal doesn't work

curt.jpeg I have a frustrating problem. My modal cannot be opened. I have a "localhost:8888/book/#rollrModal" white box in the bottom left of my browser, and that's it. and no console warnings etc. Here is the JSFiddle with the relevant code: https://jsfiddle.

Bootstrap modal doesn't work

curt.jpeg I have a frustrating problem. My modal cannot be opened. I have a "localhost:8888/book/#rollrModal" white box in the bottom left of my browser, and that's it. and no console warnings etc. Here is the JSFiddle with the relevant code: https://jsfiddle.

Bootstrap modal doesn't work?

fishermen My modal div is: <div class="modal" id="showmodal"><!-- content here --> </div> Now , after the DOM is attached with the anchor, I call it with data-toggle='modal' : <a class="c" data-toggle="modal" data-target="#showmodal">click </a> and its work.

Modal bootstrap doesn't work

Zor I put the live demo into a new page : <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> Launch demo modal </button> <div class="modal fade"> <div class="modal-dialog"> <div class="modal-content">

Bootstrap modal doesn't work

Timo I'm trying to get a modal from bootstrap, but for some reason it's showing like this: This is the default code I use from the bootstrap documentation: <!-- Button trigger modal --> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" d

Twitter bootstrap modal background doesn't disappear

Paganotti I'm using Twitter to bootstrap a modal dialog. When I click the submit button of the bootstrap modal dialog it sends an AJAX request. My problem is that the modal background doesn't disappear. The "modal" dialog does disappear correctly, but leaves t

Twitter bootstrap modal background doesn't disappear

Paganotti I'm using Twitter to bootstrap a modal dialog. When I click the submit button of the bootstrap modal dialog it sends an AJAX request. My problem is that the modal background doesn't disappear. The "modal" dialog does disappear correctly, but leaves t

Twitter bootstrap modal background doesn't disappear

Paganotti I'm using Twitter to bootstrap a modal dialog. When I click the submit button of the bootstrap modal dialog it sends an AJAX request. My problem is that the modal background doesn't disappear. The "modal" dialog does disappear correctly, but leaves t

Bootstrap modal doesn't work with Bootstrap carousel

learner I have a bootstrap template that opens by clicking the link. But this doesn't work for bootstrap carousels on the page. I tried putting the carousel HTML on top of the modal HTML and vice versa but nothing helped :( The modal looks like this - But actu

Bootstrap modal doesn't work with Bootstrap carousel

learner I have a bootstrap template that opens by clicking the link. But this doesn't work for bootstrap carousels on the page. I've tried putting the carousel HTML on top of the modal HTML and vice versa, but nothing helped :( The modal looks like this - But

Bootstrap modal doesn't work with Bootstrap carousel

learner I have a bootstrap template that opens by clicking the link. But this doesn't work for bootstrap carousels on the page. I've tried putting the carousel HTML on top of the modal HTML and vice versa, but nothing helped :( The modal looks like this - But

Float doesn't work with Twitter-Bootstrap

mr santiago I'm looking for an answer, but every time I try to use the answer, I still don't get the desired result. I'm using bootstrap thumbnail elements and trying to make them float over each other like they do on a bootstrap website. Try stuffing them int

Float doesn't work with Twitter-Bootstrap

mr santiago I'm looking for an answer, but every time I try to use the answer, I still don't get the desired result. I'm using bootstrap thumbnail elements and trying to make them float over each other like they do on a bootstrap website. Try stuffing them int

Twitter Bootstrap: Dropdown class doesn't work

John Sanderson I'm trying to see the results of the following sample code from Bootstrap's O'Reilly book. I've seen several other articles on this topic, but none seem to explain the small example below . Although I have included the bootstrap css and js files