paulstraw / FancySelect

A better select for discerning web developers everywhere.
http://code.octopuscreative.com/fancyselect/
MIT License
754 stars 165 forks source link

How to change class? #63

Open sangkavr opened 10 years ago

sangkavr commented 10 years ago

Hi, I don't understand how to set a new class for the select. I'd like to have two different select styles. Is it possible? I tried : var months = $('#my_month'); months.fancySelect(); var class = months.data('fancy-select2');

Bjornjansfelt commented 8 years ago

Bit of a late answer but I just stumbled across this issue :) you simple just set a data attribute on the html itself. This will result in a wrapped div with something like <div class="fancy-select fancy-select2"> in your case <select id="my_month" data-class="fancy-select2">