Skip to content

bbagherian/fSelect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fSelect

A jQuery select box replacement library

Demo

Click here for a live demo and example.

Usage

<select class="your-select-box" name="car">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
</select>
$('.your-select-box').fSelect();

Available options

$('.your-select-box').fSelect({
    placeholder: 'Select some options',
    numDisplayed: 3,
    overflowText: '{n} selected',
    noResultsText: 'No results found',
    searchText: 'Search',
    showSearch: true,
    showSelectAll: true
});
  • placeholder (str) - the default placeholder text
  • numDisplayed (int) - the number of values to show before switching to the overflowText
  • overflowText (str) - the text to show after exceeding the numDisplayed limit
  • noResultsText (str) - the text to show if no choices exist (or an empty string)
  • searchText (str) - the search box placeholder text
  • showSearch (bool) - show the search box?
  • showSelectAll (bool) - show the Select All option?

Single vs. multi-select

Add the multiple attribute to your <select> to enable multi-select:

<select class="your-select-box" name="paramName[]" multiple>

About

A jQuery dropdown multiselect library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.4%
  • CSS 13.1%
  • HTML 4.5%