I like to show the selections of a filed on my search page as seperate options. then the options are visable directly.
How to ?
Oke please send me an example of javascript..In the next week we will try to provide you some example
The radio list is not an option, as you cannot select more then one selection?It works like "OR" operator.
jQuery(document).ready(function(){
var check_button_class = 'btn btn-default btn-xs'; // you can customize here
var check_button_class_active = 'btn-success'; // you can customize here
jQuery('.jsn_search_module select:not(.gmap_radius_select) + div.chzn-container,.jsn_search select:not(.gmap_radius_select) + div.chzn-container').hide();
jQuery('.jsn_search_module select:not(.gmap_radius_select) option,.jsn_search select:not(.gmap_radius_select) option').each(function(){
var self = jQuery(this);
var active = self.prop('selected');
self.hide();
if(self.val().length)
{
if(active) self.parent().before('<span class="'+check_button_class+' '+check_button_class_active+'" data-select="'+self.parent().attr('id')+'" data-value="'+self.attr('value')+'">'+self.text()+'</span> ');
else self.parent().before('<span class="'+check_button_class+'" data-select="'+self.parent().attr('id')+'" data-value="'+self.attr('value')+'">'+self.text()+'</span> ');
}
});
jQuery('.btn[data-select]').each(function(){
var self = jQuery(this);
self.click(function(){
jQuery('[data-select="'+self.attr('data-select')+'"]').removeClass(check_button_class_active);
console.log(self.attr('data-select'));
self.toggleClass(check_button_class_active);
var select = jQuery('#'+self.attr('data-select'));
select.val(self.attr('data-value')).change();
});
});
});