To toggle a Bootstrap modal using jQuery, the method $('#myModal').modal('___') is used.

  • 'toggle'
  • 'show'
  • 'hide'
  • 'dismiss'
The correct method is $('#myModal').modal('toggle'). This method toggles the visibility of the modal, showing it if it's hidden and hiding it if it's visible.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *