Bootstrap drop-down menu use method analysis

The drop-down menu component in the bootstrap frame is a separate component. Specifically

drop-down menu (DropDown)

☑ LESS version: Corresponding source file DROPDOWNS.LESS


Example 1

  • Front Forum
  • ☑ Clicked Menu Item Link or Button Need to add Custom Attributes Data-Toggle = "DropDown"
  • Implement the drop-down menu Principle: DROPDOWN plug-in load, all with all Data-Toggle = Dropdown style element Binding events, users are triggered when the JavaScript event code is triggered when the user clicks the link or button with the "Data-Toggle = Dropdown" style. When the user clicks on a link or button with the "Data-Toggle = Dropdown" style, the parent container of the drop-down menu (the example is "
  • ") will add an OPEN class name, at which time the drop-down menu is displayed; When you hit, JavaScript deletes the Open class name just added, and the drop-down menu will be hidden.
drop-down menu trigger ...

If the element triggered a drop-down menu is a link element, in order to avoid clicking on the link, the page jumps to the top, you can use Data-target = “#” Alternative href = “#”

  • front-end forum
      About us  HTML5  

      pull-down menu -  Tutorial   The above is this article All of the content, I hope to help everyone's learning, I hope everyone will support Tumi Clouds. 
  • © Copyright Notice
    Just support it if you like
    comment Grab the couch

    Please log in to comment