Search code examples
javascripttwitter-bootstraptwitter-bootstrap-3bootstrap-modal

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


Solution

  • alert($('#myModal').hasClass('in'));
    

    It will return true if modal is open