Setup

Setting up superselector could not be simpler.

Include the css and the library

 <link rel="stylesheet" href="superselector.min.css">
 <script type="text/javascript" src="superselector.js">  </script> 

Create an input element to be the SuperSelctor.

<div id="example-selector"></div>

Turn the element into a superselector with some simple javascript

$("#example-selector").superselector({
    items:[ //array of items for the SuperSelector
        {value:"first", title:"First Item"},
        {value:"second", title:"Second Item"},
    ]
});

Setting The Value

The value of a SuperSelector can be set using the standard jquery val() function.

$("#example-selector").val("first"); // set selector to value of "first"

Getting The Value

The value of a SuperSelector can be read using the standard jQuery val() function.

var value = $("#example-selector").val(); // get selector value