Monday, October 20, 2014

Select or Deselect All options using jquey

Posted by Unknown  |  No comments


 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  

 Selecting or Deselecting all available checkbox options using a link on HTML page is common task.  
 <!– jQuery: Select/Deselect All –>  
 $(‘.SelectAll’).live(‘click’, function(){ $(this).closest(‘.divAll’).find(‘input[type=checkbox]‘).attr(‘checked’, true); return false; }); $(‘.DeselectAll’).live(‘click’, function(){ $(this).closest(‘.divAll’).find(‘input[type=checkbox]‘).attr(‘checked’, false); return false; });  
 <!– HTML: Select/Deselect All –>  
 <div class=”divAll”> <a href=”#” class=”SelectAll”>Select All</a>&nbsp; <a href=”#” class=”DeselectAll”>Deselect All</a> <br /> <input type=”checkbox” id=”Lahore” /><label for=”Lahore”>Lahore</label> <input type=”checkbox” id=”Karachi” /><label for=”Karachi”>Karachi</label> <input type=”checkbox” id=”Islamabad” /><label for=”Islamabad”>Islamabad</label> </div>  

 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  


5:31 AM Share:

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top