Stylize selects across all browsers with little effort.
Safari, Chrome, Firefox, Opera, IE6+
What you see is just an example of what could be achieved that works best in modern browsers with Unicode fonts. Although the script itself works great even in IE 6.
Don't use the provided theme as is on production, because it relies heavily on CSS3 and the tick symbol (✓) that is used in the dropdown is usually not available on Windows machines.
Instead make your own theme, that will be more cross-browser friendly.
$(".select_custom_syntax").ikSelect({
syntax: '▲▼'
});
$(".select_custom_syntax").ikSelect("show_dropdown");
$(".select_autowidth1").ikSelect();
$(".select_autowidth1").ikSelect("select", "value4");
$(".select_autowidth1").ikSelect("add_options", {
0: {
"value5": "option5"
},
1: {
"value6": "option6"
}
});
$(".select_autowidth1").ikSelect("remove_options", ["value4", "value5"]);
$(".select_dd_autowidth").ikSelect({
autoWidth: false
});
$(".select_dd_autowidth").ikSelect("add_options", {
"value5": "option5"
});
$(".select_noautowidth").ikSelect({
autoWidth: false,
ddFullWidth: false
});
$(".select_custom_class").ikSelect({
customClass: "select_black",
ddCustomClass: "select_black_block"
});
var options_obj = {};
for(var i=5; i<1005; i++){
optionValue = 'value'+ i;
options_obj[optionValue] = 'option'+ i;
}
var d0 = new Date();
$(".select_custom_class").ikSelect("add_options", options_obj);
var d1 = new Date();
$(this).append(", "+ (d1-d0) +"ms");
$(".select_add_option").ikSelect();
option_index = 5;
$(".add_option_to_real").click(function(){
$(".select_add_option").append("");
option_index++;
$(this).html('add option "option '+ option_index +'" to the real select and reset the fake one');
$(".select_add_option").ikSelect("reset");
});
$(".select_autowidth_noddfullwidth").ikSelect({
ddFullWidth: false
});
$(".select_autowidth2").ikSelect();
$(".select_1000").each(function(){
var html = "";
for(var i=0; i<1000; i++){
if(i==4){
html += '';
} else{
html += '';
}
}
$(this).append(html);
});
$(".select_1000").ikSelect();
$(".select_hidden").ikSelect();
$(".select_hidden_wrap").fadeIn();
$(".select_hidden").ikSelect("redraw");
$(".select_disable").ikSelect();
$(".select_disable").ikSelect("disable");
$(".select_disable").ikSelect("enable");
$(".select_disable").ikSelect("toggle");
$(".select_disable").ikSelect("disable_optgroups", [0]);
$(".select_disable").ikSelect("enable_optgroups", [0]);
$(".select_disable").ikSelect("disable_options", ['value3']);
$(".select_disable").ikSelect("enable_options", ['value3']);
$(".select_disable").ikSelect("detach");
$(".select_filter").ikSelect({
filter: true
});