Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="collapseOne">
- <span class="custom-checkbox addspace pull-left">
- <input type="checkbox"/>
- <span class="box"><span class="tick"></span></span>
- </span>
- </div>
- <div id="collapseTwo">
- <span class="custom-checkbox addspace pull-left">
- <input type="checkbox"/>
- <span class="box"><span class="tick"></span></span>
- </span>
- </div>
- $(document).ready(function() {
- $a=$('#collapseOne input[type="checkbox"]').filter(':checked').length;
- $b=$('#collapseTwo input[type="checkbox"]').filter(':checked').length;
- if(($a && $b)>0 ){
- $("#button").addClass('active')
- }
- else{
- $("#button").removeClass('active').addClass('disabled')
- }
- });
- $a=$('#collapseOne input[type="checkbox"]').filter(':checked').length;
- $b=$('#collapseTwo input[type="checkbox"]').filter(':checked').length;
- if($a > 0 && $b>0 ){
- if(($a && $b)>0 ){
- $(document).ready(function () {
- $('input[type="checkbox"]').change(function () {
- $a = $('#collapseOne input[type="checkbox"]').filter(':checked').length;
- $b = $('#collapseTwo input[type="checkbox"]').filter(':checked').length;
- if (($a && $b) > 0) {
- $("#button").addClass('active')
- } else {
- $("#button").removeClass('active').addClass('disabled')
- }
- }).change();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement