Usage of Bootstrap Modal Plugins


A modal is a child window that is layered over its parent window. Typically, the purpose is to display content from a separate source that can interact without leaving the parent window. Child windows can provide information, interaction, or more.

Toggle the modal plugin's hidden content −

  • Via data attributes − Set attribute data-toggle = "modal" on a controller element, like a button or link, along with a data-target = "#identifier" or href = "#identifier" to target a specific modal (with the id = "identifier") to toggle.
  • Via JavaScript − Using this technique you can call a modal with id = "identifier" with a single line of JavaScript − $('#identifier').modal(options)

Updated on: 12-Jun-2020

129 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements