Posted By

webbu on 05/01/13


Tagged

table jquery checkbox tr selectable


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webbu


Jquery table tr checkbox selectable


 / Published in: jQuery
 

Jquery table tr checkbox selectable http://jqueryui.com/selectable/

required *jquery *jqueryui

  1. <table class="tablo">
  2. <tr class="ui-widget-content">
  3. <td><input type="checkbox" class="checkbox" /></td>
  4. <td>├Âmer</td>
  5. </tr>
  6. <tr class="ui-widget-content">
  7. <td><input type="checkbox" class="checkbox" /></td>
  8. <td>faruk</td>
  9. </tr>
  10. <tr class="ui-widget-content">
  11. <td><input type="checkbox" class="checkbox" /></td>
  12. <td>parlar</td>
  13. </tr>
  14. </table>
  15. <script type="text/javascript">
  16. $(document).ready(function(){
  17.  
  18. $(".tablo").selectable({
  19. filter: "tr",
  20. selected: function(evennt,ui) {
  21. $( ".ui-selected", this ).each(function(a,b) {
  22. $('.checkbox',b).attr('checked',true);
  23. });
  24. }
  25. });
  26. });
  27.  
  28. </script>
  29. #webuti
  30. #qmerfp

Report this snippet  

You need to login to post a comment.