JavaScript Hide Bootstrap modal with fade out effect using Javascript hide bootstrap modal jquery,hide bootstrap modal using javascript,hide

I have a basic bootstrap modal to log in, which doesn't close itself when I hit submit. I solved it using this simple jquery:

$('#myModal').modal('hide');

But I also want the modal to fade out properly using bootstrap's fade class - which currently doesn't happen, it instantly gets hidden.

How can I do this?

Answer:1

$('#myModal').delay(1000).fadeOut(450);

 setTimeout(function(){
    $('#myModal').modal("hide");
 }, 1500);
Answer:2

Make sure the HTML of your modal has the .fade class, Bootstrap will do the rest, per their documentation:

<div class="modal fade">
  Modal content here
</div>

If you are still having trouble, you'll have to post more of your code.

Answer:3

use jQuery :

$('#myModal').fadeOut();
Answer:4

How to convert string to timestamp and date in JS. here am using Date.parse(), but its not working in IE and FF. My code is.. in chrome its working fine. var str = "05-Sep-2013 01:05:15 PM "; ...

How to convert string to timestamp and date in JS. here am using Date.parse(), but its not working in IE and FF. My code is.. in chrome its working fine. var str = "05-Sep-2013 01:05:15 PM "; ...

  1. date.parse not working in ie
  2. date.parse not working in safari
  3. date.parse not working
  4. date.parse not working in ie11
  5. date.parse not working in firefox
  6. date.parse not working in mozilla
  7. date.parse not working in chrome
  8. date.parse not working in internet explorer
  9. date.parse not working jquery
  10. date.parse not working java
  11. date.parse javascript not working
  12. tableau date parse not working
  13. date.parse in javascript not working in ie
  14. javascript date.parse not working in firefox

A bit of a newbie question but what is the best way to get a list with full name path of all JS files loaded on my website? To clarify: I have a page www.mypage.com - I want to get a list of all the ...

A bit of a newbie question but what is the best way to get a list with full name path of all JS files loaded on my website? To clarify: I have a page www.mypage.com - I want to get a list of all the ...

  1. php list loaded files
  2. gdb list loaded files
  3. ruby list loaded files
  4. vim list loaded files
  5. emacs list loaded files

I am attempting to do a simple drag and drop from one column to another. I am copying the element so that the list on the right can have multiple versions of the element on the left. Don't worry, I'm ...

I am attempting to do a simple drag and drop from one column to another. I am copying the element so that the list on the right can have multiple versions of the element on the left. Don't worry, I'm ...

I have a ul list which has li's and in li there is div with no class and id. I just want to find li>div which has text saying 'Certificats et forfaits' and hide anchor tag which is next to it. Is it ...

I have a ul list which has li's and in li there is div with no class and id. I just want to find li>div which has text saying 'Certificats et forfaits' and hide anchor tag which is next to it. Is it ...

  1. find specific string in excel
  2. find specific string in python
  3. find specific string in list python
  4. find specific string in php
  5. find specific string regex
  6. find specific string in linux
  7. find specific string in excel cell
  8. find specific string matlab
  9. find specific string in file python
  10. find specific string in c#
  11. find specific string in file linux
  12. find specific string in array javascript
  13. find specific string in sql
  14. find specific string in text file powershell
  15. find specific string in all files linux
  16. find specific string in javascript
  17. find specific string in stored procedure
  18. find specific string in sql database
  19. find specific string in r
  20. find specific string in jquery