Skip to content

A better select for discerning web developers everywhere.

Notifications You must be signed in to change notification settings

hiroian/FancySelect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FancySelect

A better select for discerning web developers everywhere, lovingly crafted by Octopus Creative. You can download it here, or check out the demo.

Basic Usage

FancySelect is easy to use. Just target any select element on the page, and call .fancySelect() on it. If the select has an option with no value, it'll be used as a sort of placeholder text.

By default, FancySelect uses native selects and styles only the trigger on mobile devices. To override this, pass an object with forceMobile set to true when initializing it.

HTML

<select class="basic">
  <option value="">Select something…</option>
  <option>Lorem</option>
  <option>Ipsum</option>
  <option>Dolor</option>
  <option>Sit</option>
  <option>Amet</option>
</select>

JavaScript

$('.basic').fancySelect();

Updating Options

If the options in your select change after initializing FancySelect, you can tell it to rebuild the list of options by triggering replace on the select element.

JavaScript

var mySelect = $('.my-select');

mySelect.fancySelect();

mySelect.append('<option>Foo</option><option>Bar</option>');

mySelect.trigger('update');

About

A better select for discerning web developers everywhere.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published