Skip to content

thirdender/dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery SELECT Replacement

I got tired of not being able to style SELECTs easily. This is a bad attempt to fix that with some Javascript :-p

It's based on code from the site Janko at Warp Speed. I've added a few changes of my own, and the results can be seen on the sample page.

To use, include the CSS file from the desired style, a copy of jQuery, and a copy of dropdown.min.js. Add a class to the SELECTs you want to replace, and call the library in your JS as follows.

$(".yourClass").dropdown();

TODO:

  • Better documentation
  • Add destroy method and namespace event binding
  • Handle "selected" attribute
  • Add a custom scrollbar when the dropdown gets too long
  • Mirror changes that happen to the original SELECT
  • SELECT MULTIPLE
  • Add ARIA elements
  • Keep selected value after page refresh
  • Tie into jQuery UI

Releases

No releases published

Packages

No packages published