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

bootstrap下拉菜单使用方法解析

Example 1
 W3CPLUS  

  • 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 = “#”
Dropdown



  • front-end forum
      About us  HTML5  
    SASS


      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
    THE END
    Just support it if you like
    like0
    share
    comment Grab the couch

    Please log in to comment