zurb-foundation6-multiselect
zurb-foundation6-multiselect copied to clipboard
need to connect event listeners
At the moment you can't use event listeners and values. It would be nice to have one of the following:
1.) every check/uncheck changes the original SELECT-element value and triggers 'change' and 'input' events at this one
OR
2.) provide your own event functions, e. g. 'onafterwritinglive' or similar, with checked values as arguments
it's a nice work, thanks a lot
Using testing branch, you can try to initialize multiselect in this way:
$("#menu").zmultiselect({
filter: true,
filterResult: true,
selectAll: true,
get: "zmultiselect",
placeholder: "I'm a MultiSelect",
live: '#menu_live',
onLoad: function(id){
console.log("id " + id);
},
onChange: function(id, live){
console.log('change trigger', id, live);
},
});
I need to test it out a little more.
@rteinze Between version 5 and 6, I found I needed to use the updateNativeSelect: true
option. Documentation doesn't make reference to it, so I did some source diving to find it.
Also, the change
event seems to get triggered on the element with the .zselect
class and not on the original select element as it did in version 5.