JSFiddle - React, Tailwind, and code Playground

by Dylan Schadeck

HTML

<input type="button" class="check" value="check all" />

   <input type="checkbox" class="cb-element" /> Checkbox  1
   <input type="checkbox" class="cb-element" /> Checkbox  2
   <input type="checkbox" class="cb-element" /> Checkbox  3

JavaScript

$(document).ready(function(){
    $('.check:button').live("click",function(){
    $('input:checkbox').attr('checked','checked');
    $(this).val('uncheck all').attr('class','uncheck')
    //alert('cuck')
})
        $('.uncheck:button').live.("click",function(){
     $('input:checkbox').removeAttribute('checked');
    $(this).val('check all').attr('class','check')
})
     })