Right now this is implemented as a CSS menu. If you want this to be a combo box you'll need to use JavaScript.
Simply listen for click events on the list's items and replace the current item with the clicked one. To use in a form you can set the items' value in a "data-value" attribute and store the selected one in a hidden input.
5 comments
dhamaso said
How I can save the selected item and how I can mark the current item?
Thibaut said
Right now this is implemented as a CSS menu. If you want this to be a combo box you'll need to use JavaScript.
Simply listen for click events on the list's items and replace the current item with the clicked one. To use in a form you can set the items' value in a "data-value" attribute and store the selected one in a hidden input.
dhamaso said
mmmm... jquery => .data( key, value ) right? i will try it thanks.
ram swaroop said
have used your concept in my site,thanks mate!
Alex Tom said
Can you put a version of the combo box also? Much appreciated.