on click Enable and Disable check box on jquery


click   Show   Add   Edit   Delete  

code : 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
function EnableCheckBox(x){
var classname = $(x).attr("class");
if($(x).attr("checked")){
 $('.'+classname+'action').removeAttr("disabled");
 } else {
$('.'+classname+'action').removeAttr("checked");
$('.'+classname+'action').attr("disabled","true");
}
}

</script>
<table>
    <tr>
 <td> click &nbsp; </td>
 <td><input type="checkbox" name="subsection-click[]" value="show" class="click" onclick="EnableCheckBox(this);" /> Show &nbsp; </td>
  <td> <input type="checkbox" name="subsection-click[]" value="add" class="clickaction"  disabled="disabled" /> Add  &nbsp;  </td>
  <td> <input type="checkbox" name="subsection-click[]" value="edit" class="clickaction" disabled="disabled" /> Edit  &nbsp; </td>
  <td> <input type="checkbox" name="subsection-click[]" value="delete" class="clickaction" disabled="disabled" /> Delete   &nbsp; </td>
</tr>
   </table>

Comments

  1. We get stuck sitting down in front of the computer for
    more than eight hours. These can be useful to people who qualify.
    Thin Within Christian health educationThe Thin Within program offers a number of years now.
    Many people actually don't know which exercises are beneficial for health education and anti aging benefits act as a guide for setting weight-loss, eating and exercise plan is working.

    My web site - como conseguir emagrecer rapido

    ReplyDelete
  2. Hello there! Quick question that's totally off topic. Do you know how to make your site mobile friendly? My web site looks weird when viewing from my iphone 4. I'm
    trying to find a template or plugin that might be able to resolve this problem.
    If you have any suggestions, please share. Many thanks!



    Also visit my page; http://www.barbour-uk.info/

    ReplyDelete

Post a Comment

If you Satisfied , Please Leave a comment

Popular posts from this blog

Call PHP Function In JavaScript Using Ajax

List of Post Category Wise in wordpress