SelectMenu.js---Simple, easily and diversity menu solution
SelectMenu.js is a plugin which is Simple, easily and diversity for menu solution. And it has powerful functions such as dropdown, search,classiify and customer contents and so on.
Github here
documents here
I also link the font-awesome css file to show icons in the demo.
Attention:
the jquery doesn't work on version 3.0. You should link the version 2.0 or below.
issue on git
step2:
Three demo:
two clikable buttons and an area for right click
step3:
regular menu:
menu header items
link the content with url
sm_divider for dividing the contents
callback a function after click
More:
title
arrow is not default which has three options positions:right,left and center
Github here
documents here
How to apply🙋
step1:<!-- Basic environment reference -->
<!-- jQuery library include -->
<script type="text/javascript" src="jquery.min.js" >< /script>
<!-- SelectMenu style sheet -->
<link rel="stylesheet" href="selectmenu.css" type="text/css">
<!-- SelectMenu plugin js file include -->
<script type="text/javascript" src="selectmenu.js" >< /script>
I also link the font-awesome css file to show icons in the demo.
Attention:
the jquery doesn't work on version 3.0. You should link the version 2.0 or below.
issue on git
step2:
<!--
Set the trigger menu to open the object, where
only the most commonly used button as an example
-->
<button type="button" id="btnDemo">Select Menu</button>
html |
two clikable buttons and an area for right click
step3:
js |
regular menu:
menu header items
link the content with url
sm_divider for dividing the contents
callback a function after click
More:
title
arrow is not default which has three options positions:right,left and center
js |
showField :
'name'
,
//set display content field in data row
keyField :
'id'
,
//set key value field in data row
search :
false
,
//close quick search bar
title :
false
,
//close title bar
listSize : 5,
//set menu size(menu results list height = item height * size)
multiple :
true
,
//enabled multiple select mode
initSelected : 1,
//selected item when init complete
rightClick :
true
,
//enable right click call mode