-
Improvement
-
Resolution: Fixed
-
Trivial
-
3.1.0-a1
-
None
Users and extension authors might want to create their own dropdown menus similar to notifications list and responsive menu dropdowns.
Patch in this ticket makes it possible to create basic dropdown menu by simply adding code like this to template:
<div class="dropdown-container">
|
<a href="URL" class="dropdown-trigger">Dropdown Trigger!</a>
|
<div class="dropdown" style="display: none;">
|
<div class="pointer"><div class="pointer-inner"></div></div>
|
<div class="dropdown-contents">
|
Dropdown contents!
|
</div>
|
</div>
|
</div>
|
|
Wrap it in rightside or add rightside class to dropdown-container if item is on right side of page by default, which will open dropdown to left.
By adding classes dropdown-left, dropdown-right, dropdown-up or dropdown-down to dropdown-container you can force dropdown to open in certain direction. These classes usually should not be needed.
Difference between .rightside and .dropdown-left is .rightside affects menu when JavaScript is disabled, .dropdown-left forces JavaScript to open menu on left side. Usually user will need to use only .rightside