Skip to content

jQuery plugin to replace the awful native browser select elements

Notifications You must be signed in to change notification settings

perfectline/jquery_fancyselect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jQuery plugin for awesome looking selects

The goal of this plugin is to give designers full control over how select elements appear. This plugin replaces the traditional HTML select element with DIV elements that can be styled in any way the designer needs to.

Supported Behaviour

  • opening the select when clicking on it
  • hovering over an element shows a hover effect
  • up + down, left + right move to previous or next element
  • enter or mouse click chooses the currently selected element
  • escape closes the select
  • clicking anywhere on the document outside the select closes the select

Not supported

  • typing the first few letters of an option to have it automatically be chosen

Plans

  • build the DOM automatically from select elements

Usage:

$(document).ready(function(){ $('div.fancyselect').fancyselect({

   onOpen: function(){
     console.log("select opened");
   },

   onClose: function(){
     console.log("select closed");
   },

   onSelect: function(item){
     console.log(item);
   }

 });

});

Demo

See demo.html for the required DOM structure and a generic example on how to use the plugin.

Authors

License

Copyright 2012 by PerfectLine LLC (http://www.perfectline.co.uk) and is released under the MIT license.

About

jQuery plugin to replace the awful native browser select elements

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published