I have very simple HTML code that should open a fade mode, but it only shows and hides without fading in or out.
Here is the code:
<!DOCTYPE html> <html> <head> <link type="text/css" rel="stylesheet" href="css/bootstrap.css" /> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="js/bootstrap-modal.js"></script> </head> <body> <div id="myModal" class="modal hide fade"> <div class="modal-header"><h4>I'm a header</h4></div> <div class="modal-body"><p>Hello from the body</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> <a data-toggle="modal" href="#myModal" class="btn btn-primary">Launch Modal</a> </body> </html>
This code was taken from the Twitter Bootstrap documentation.
In jsFiddle, this simple code works just fine! But if I save the above code as .html inside the folder with all the necessary files (.css and .js), it modally opens in a simple way, without fading!
What am I doing wrong?
Thanks in advance.
source share