• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
checkbox color with select all not working

#1
I am having matrix type of checkboxes . want to add color for that.

my view
*******
select all checkbox
***************
<td align="center">
    <?php echo $rowe['subcode']; ?> <input type="checkbox" id="check-all2" onClick="toggle(this,<?php echo $rowe['markid']; ?>)" value="<?php echo $rowe['markid']; ?>" data-checkbox-class="icheckbox_square-blue">
</td>
-----------------------------------------------------------------------------------------
with in box
**********

<td align="center"> <input type="checkbox" name="friend_id[]" value="<?php echo $row1['markid'];?>_<?php echo $row['regno'];?>" >
-------------------------------------------------------------------------------------------------------------

checkbox color
***********

<script src="<?php echo base_url(); ?>assets/js/addUser.js" type="text/javascript"></script>
<!--
<script src="<?= base_url('assets/plugins/iCheck/icheck.min.js') ?>"></script>
    <script>
      $(function () {
        $('input').iCheck({
          checkboxClass: 'icheckbox_square-green',
         //checkboxClass: 'icheckbox_square-blue',
         // radioClass: 'iradio_square-blue',
          increaseArea: '25%' // optional
        });
        
      });

  </script> 


select all
**********
<script language="JavaScript">
  function toggle(source, markid) {
          checkboxes = document.getElementsByName(markid);
          for(var i=0, n=checkboxes.length;i<n;i++) {
              checkboxes[i].checked = source.checked;
          }

  }
</script>


how to add a color for that checkboxes and i select select_all for every row that corresponding data of checkboxes to be checked. how to implement this?


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
checkbox color with select all not working - by kvanaraj - 07-06-2018, 05:53 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.