Home > Web Front-end > JS Tutorial > How to Open a Bootstrap Modal Window with jQuery?

How to Open a Bootstrap Modal Window with jQuery?

Patricia Arquette
Release: 2024-11-17 08:28:03
Original
429 people have browsed it

How to Open a Bootstrap Modal Window with jQuery?

How to Open a Bootstrap Modal Window Using jQuery

Solution

Twitter Bootstrap provides several functions that can be manually invoked on modal windows:

  • $('#myModal').modal('toggle'): Toggles the modal window between visible and hidden.
  • $('#myModal').modal('show'): Displays the modal window.
  • $('#myModal').modal('hide'): Hides the modal window.

To open a modal window programmatically, use the $('#myModal').modal('show') method instead of $('#my-modal').modal({ show: 'false' }).

Custom Popups

If you want to create a custom popup, consider using the following video tutorial:

[https://www.youtube.com/watch?v=zK4nXa84Km4](https://www.youtube.com/watch?v=zK4nXa84Km4)

The above is the detailed content of How to Open a Bootstrap Modal Window with jQuery?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template