Overview
combobox is a jQuery plug-in for rendering custom combobox with filtering feature. It is stil under development and in beta stage, for more details read Known Issue section below.
Demo
Below is a simple example to demonstrate combobox plugin.
Usage
To use the function, include jQuery library and combobox plugin.
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script type="text/javascript" src="https://raw.github.com/meetselva/combobox/master/combobox.js"></script>
Include the css for combobox plugin,
<link rel="stylesheet" type="text/css" href="combobox.css" />
Now use the plugin like below,
<script type="text/javascript"> $(document).ready(function() { // v-- textbox that will be replacing the drop down $('#fruits_combobox').combobox({ optionEl: '#fruits', /* source options imported from this drop down selector*/ width: 200, /* width of the combobox drop down */ filterType: 'contains', /* Type of filter to apply on the options (starts-with, contains, or blank for no filtering) */ onSelect: function () { console.log('option selected'); } }); }); </script>