Hello Artur,
Thanks for your plugin. Try to add this into your module for lazy loading.
It is very useful, when you working with big number of checkboxes.
In addition you can store el.parent() in local var, because it's used 4 times.
Plugin.prototype = {
init: function ( options ) {
...
if(el.parent().hasClass('has-pretty-child')) {
addCheckableEvents(el.parent());
return;
}
...
After this update i can preload styles :)
.clearfix.prettycheckbox.labelright.blue.has-pretty-child
%input.pretty.hidden{'data-id' => factor_h[:id], name: 'link[]', type: 'checkbox', value: factor_v[:id]}
%a{href: '#', class: linked_checkbox?(factor_h, factor_v[:id])}