drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.38k stars 1.62k forks source link

How to fast apply iCheck to ~2000 inputs #376

Open Phil795 opened 7 years ago

Phil795 commented 7 years ago

Hi guys,

I need to initalize ~2000 input checkboxes. If I use the default function it takes ~1 minute.

$('[name="<ELEMENTNAME>"]').iCheck({
    checkboxClass: 'icheckbox_minimal-green'
});

Is there a way to make it faster? Or is it possible to insert direct html code?

Like this (I know, it doesnt work)

<div class="icheckbox_minimal-green hover" style="position: relative;">
    <input type="checkbox" name="<ELEMENTNAME>" style="position: absolute; opacity: 0;">
    <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
</div>
genechuah commented 7 years ago

Hi Phil. Did you find the solution to this? I'd like to know too...

SlowburnAZ commented 7 years ago

I'd like a solution to this, too...

Phil795 commented 7 years ago

No i think there is no solution