Wednesday 31 October 2012

Checkbox Onclick Select All And Unselect All


Following check the effect of jquery select all and unselect all.          

                                                         

                                     31 32 33 34 37 38 39 40

                                     10 11 12 13 14 17 18 19

                                     20 21 22 23 24 27 28 29

This is the jquery simple select all and unselect function. These function is following just check it.

  $(function(){$("#select_all").click(function() {
        $('input[name*="chk2"]').attr("checked","checked"); });
    });
    $(function() { $("#unselect_all").click(function() {
        $('input[name*="chk2"]').removeAttr("checked"); });
    });


These two function work to select all or unselect all checkbox. Following is given code of these functionality in textarea.

Just copy and paste in your page for testing purpose. This is for demo copy code and run.

This is great code for select and uselect and optimisation code.

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Best digital marketing agency in Dubai We are in an ‘ always on ‘ world. Connecting, sharing, collaborating. We, at ISD Global, help brands digitell the digital while distinguishing the distinguished and distilling the brand essence. ISD Global can evaluate the strength of your brand through a brand audit. The –––audit can be initiated before embarking on a Brand Engineering exercise or at any time that you want to establish your brand’s power/equity in the marketplace. The brand identity reflects stakeholder vision, the brand positioning and resonates with the brand’s core values.

    ReplyDelete