Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Commit 6233be2

Browse files
committed
Update
1 parent e742cd6 commit 6233be2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

readme.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,37 @@ Dropdown menu pattern.
116116
</div>
117117
```
118118

119+
## javascript libraries and plugins
120+
121+
```html
122+
<script src="path/to/jquery.js"></script>
123+
<script src="path/to/perfect-scrollbar.js"></script>
124+
<script>
125+
$(function() {
126+
127+
// perfect scrollbar
128+
const ps = new PerfectScrollbar('.scrollbar');
129+
130+
// click show/hide menu
131+
$('.nav .click').on('click', function() {
132+
$('.nav .responsive').toggleClass('expandable');
133+
});
134+
135+
// responsive menu
136+
$('ul.menu li').each(function() {
137+
if ($(this).children('li.parent a.current').length > 0 ) {
138+
$(this).parent().find('ul.submenu').toggle();
139+
$(this).parent().find('li.parent a.employ').addClass('active');
140+
}
141+
});
142+
143+
// responsive active menu
144+
$('ul.menu li a').on('click', function() {
145+
$(this).parent('li.parent').find('a.employ').toggleClass('active');
146+
$(this).parent().find('ul.submenu').slideToggle('fast');
147+
});
148+
});
149+
</script>
150+
```
151+
119152
Enjoy the menu.

0 commit comments

Comments
 (0)