Selecter

A jQuery plugin for replacing default select elements.

Current Version: 3.1.4


Installation

Include the following resources on your page before initializing:

<script src="jquery.fs.selecter.js"></script>
<link href="jquery.fs.selecter.css" rel="stylesheet">

Bower

You can deploy and update via the command line with Bower:

bower install Selecter

Options

Options are set by passing a valid options object at initialization or to the public "defaults" method. You can also set custom options for a specific instance by attaching a data-boxer-options attribute containing a properly formatted JSON object to the target element.

Name Type Default Description
callback function $.noop Select item callback
cover boolean false Cover handle with option set
customClass string '' Class applied to instance
label string '' Label displayed before selection
external boolean false Open options as links in new window
links boolean false Open options as links in same window
mobile boolean false Force desktop interaction on mobile
trim int 0

Methods

Methods are publicly available to all active instances, unless otherwise stated.

defaults

Sets default plugin options

$.selecter("defaults", opts);
Parameter Type Default Description
opts object {} Options object

disable

Disables target instance or option

$(".target").selecter("disable", "1");
Parameter Type Default Description
option string null Target option value

destroy

Removes instance of plugin

$(".target").selecter("destroy");

enable

Enables target instance or option

$(".target").selecter("enable", "1");
Parameter Type Default Description
option string null Target option value

refresh

Updates instance base on target options

$(".target").selecter("refresh");