This repository was archived by the owner on Sep 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -116,4 +116,37 @@ Dropdown menu pattern.
116
116
</div >
117
117
```
118
118
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
+
119
152
Enjoy the menu.
You can’t perform that action at this time.
0 commit comments