list.js is using search box as default. Anyone know, how to use dropdown selection box for list.js?
I have used:
Javascript:
<script type="text/javascript">
$('#tpi').change(function () {
var selection = this.value; //grab the value selected
var options = { valueNames: [ 'name', 'type', 'tpi' ]
};
var userList = new List('users', options);
});
</script>
HTML
<select name="tpi" id="tpi">
<option selected="selected" value="tpi">TPI</option>
<option value="11">11</option>
<option value="14">14</option>
<option value="16">16</option>
<option value="18">18</option>
<option value="19">19</option>
</select>
But not working. :(
Try something like this:
Make sure you place this script below the html stuff that needs to be filtered.