Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <div id="collapseOne">
  2. <span class="custom-checkbox addspace pull-left">
  3. <input type="checkbox"/>
  4. <span class="box"><span class="tick"></span></span>
  5. </span>
  6. </div>
  7. <div id="collapseTwo">
  8. <span class="custom-checkbox addspace pull-left">
  9. <input type="checkbox"/>
  10. <span class="box"><span class="tick"></span></span>
  11. </span>
  12. </div>
  13. $(document).ready(function() {
  14. $a=$('#collapseOne input[type="checkbox"]').filter(':checked').length;
  15. $b=$('#collapseTwo input[type="checkbox"]').filter(':checked').length;
  16.  
  17. if(($a && $b)>0 ){
  18. $("#button").addClass('active')
  19. }
  20. else{
  21. $("#button").removeClass('active').addClass('disabled')
  22. }
  23.  
  24. });
  25.  
  26. $a=$('#collapseOne input[type="checkbox"]').filter(':checked').length;
  27. $b=$('#collapseTwo input[type="checkbox"]').filter(':checked').length;
  28.  
  29. if($a > 0 && $b>0 ){
  30.  
  31. if(($a && $b)>0 ){
  32.  
  33. $(document).ready(function () {
  34. $('input[type="checkbox"]').change(function () {
  35. $a = $('#collapseOne input[type="checkbox"]').filter(':checked').length;
  36. $b = $('#collapseTwo input[type="checkbox"]').filter(':checked').length;
  37.  
  38. if (($a && $b) > 0) {
  39. $("#button").addClass('active')
  40. } else {
  41. $("#button").removeClass('active').addClass('disabled')
  42. }
  43. }).change();
  44. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement