Skip to content

Instantly share code, notes, and snippets.

@khrtz
Last active May 22, 2016 18:10
Show Gist options
  • Save khrtz/d817a5ae1560b759c1002fa6e7230b2e to your computer and use it in GitHub Desktop.
Save khrtz/d817a5ae1560b759c1002fa6e7230b2e to your computer and use it in GitHub Desktop.
$(function() {
$("#tab-select").tabs();
$("#tab1").css("background-color", "#fff")
$("#tab2").css("background-color", "#D8D8D8")
});
$(document).on('click', '#tab1', function() {
$("#tab1").css("background-color", "#fff")
$("#tab2").css("background-color", "#D8D8D8")
$("#cf-btn-next-button").prop('disabled',false);
});
$(document).on('click', '#tab2', function() {
$('input[name="contributions_form[payment_descriptor]"]').prop('checked', true);
$("#tab1").css("background-color", "#D8D8D8")
$("#tab2").css("background-color", "#fff")
$("#cf-btn-next-button").prop({'disabled':true});
});
$(document).on('change', 'input[name="agreement"]', function() {
if($(this).is(':checked')) {
$("#cf-btn-next-button").prop('disabled',false);
} else {
$("#cf-btn-next-button").prop('disabled',true);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment