Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. onchange="$.get('set_item.php?stockID='.$row[stockID].'&push='+this.checked);"
  2.  
  3. $(document).ready(function () {
  4.  
  5. $('#selectChb').click(function(){
  6. $(':checkbox').prop("checked", true);
  7. });
  8.  
  9. $(":checkbox:checked").each(function() {
  10. str = this.val();
  11. $.get('set_item.php?stockID='+str+'&push='+this.checked);
  12. });
  13.  
  14. $(":checkbox:not(:checked)").each(function() {
  15. str = this.val();
  16. $.get('set_item.php?stockID='+str+'&push='+this.checked);
  17. });
  18.  
  19. });
  20.  
  21. $(document).ready(function () {
  22.  
  23. $('#selectChb').click(function(){
  24. $(':checkbox').prop("checked", true);
  25. });
  26.  
  27. $(":checkbox").on("change", function() {
  28. if($(this).is(":checked"))
  29. {
  30. str = $(this).val();
  31. $.get('set_item.php?stockID='+str+'&push='+this.checked);
  32. }
  33. });
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement