drumjs
drumjs copied to clipboard
Its is not working for dynamically added options.
If i added options dynamically elements are adding but if i drag up and down every time one number is missing.
for ex :i have 15 options ,first time it works if i do up and down 14 th num will be missing next time 13 num is missing so on...
At line 271 add:
this.updateItems = function() {
$(wrapper).remove();
var drum = new Drum(element, options, transformProp);
element.data('drum', drum);
}
after in 343:
updateItems : function() {
if ($(this).data('drum'))
$(this).data('drum').updateItems();
}
so call to update the items:
$(select).drum('updateItems');
@ksfreitas you solution is not working properly. i downloaded your forked drum.js, but when i call the function with update parameters, the function does not work at all.
i am building an angularJS WebApp
update when you call .drum() for the first time and your