/* * Easy Select Box 1.0.7 * https://github.com/kosinix/easyselectbox * Replace select with div for easy styling via css. * Features: multiple instances, initial value specified by selected attribute, optional classNames, optional speed, callback onClick, callback onBuildList * Tested: IE7, IE8, Chrome 10, FF3, Safari 3.2 windows, Opera 11 * * Copyright 2012, Nico Amarilla * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function($){ var timer = null; var methods = { init : function( options ) { //Settings list and the default values var defaults = { classNames:{selectbox:'',displayer:'esb-displayer',dropdown:'esb-dropdown',item:'esb-item'}, disabled:false, //true to disable select, onBuildList:null,//callback after dropdown items are built. Can be used for customized dropdown items appearance. onClick:null,//callback when easySelect is clicked. Param data contains data.value and data.text speed:0 //speed of opening and closing drop down in ms }; options = $.extend(true, {}, defaults, options); return this.each(function() { var selectObj = $(this);//jquery object of our select element if('select'!=selectObj[0].nodeName.toLowerCase()){//check if its a