1. Go to this page and download the library: Download hypejunction/menus_dropdown library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hypejunction / menus_dropdown example snippets
elgg_register_menu_item('entity', array(
'name' => 'parent',
'href' => '#',
'text' => 'Parent item',
'item_class' => 'elgg-menu-item-has-dropdown',
// controls the position relative to the trigger
'data-position' => json_encode([
'my' => 'right top',
'at' => 'right bottom+5px',
]),
// popup appear in a fixed position and detached from the original DOM position
// you can add an additional class to have more control over styling
'data-popup-class' => 'elgg-menu-entity-popup',
'data-collision' => 'fit fit',
));
elgg_register_menu_item('entity', array(
'name' => 'child',
'parent_name' => 'parent',
'href' => '/child',
'text' => 'Child item',
));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.