tuupola / jquery_chained

Chained Selects for jQuery and Zepto
https://appelsiini.net/projects/chained/
589 stars 283 forks source link

Add name for empty value #40

Open matiosfree opened 9 years ago

matiosfree commented 9 years ago
$.fn.remoteChained.defaults = {
        ...
        emptyValueName: '-'
};

And before "Add new options from json" need to add this code:

if (settings.emptyValueName) {
    option_list.unshift(['', settings.emptyValueName]);
}