Custom Select Box with new approach



This is my new JQuery plugin for replacing select box. I have tried to implement some cool features which makes it easy to implement and you can play with it as like the native one.

Your suggestions, issues are welcome, so that I can improve this plugin

DEMO

Fork this on GitHub

Implementation:

Step 1: include css and scripts in head section

<link href="customselectbox.css" rel="stylesheet" type="text/css"></link>
<script src="http://code.jquery.com/jquery-1.9.0.js"></script>
<script src="customselectbox.js"></script>

Step 2: initialize customselect box

$(document).ready(function(){
  $('select').customSelect();
});

Features:

  1. Support thumbnails within option
  2. Search option
  3. Set and Get value with normal JQuery method. No need to process or query the generated new select box, you can use the ref of the native select box.
    eg:
    //set value
    $('#myselect').val(value);
    //get value
    $('#myselect').val();
    
    
  4. Support native reset within the form - i.e) when form gets reset the value of the select box gets reset to its default value
  5. supported browsers: IE8+, firefox, safari, chrome
  6. attaching events,
    $('select').change(function () {
       alert('Change Event Fired');
    });
    
    $('select').click(function () {
      alert('Click Event Fired');
    });
    
    

Popular posts from this blog

Simple Animation Using C

Personal Diary - A Mini Project Written in Turbo C With Graphical Interface

2D Reflection