Skip to content

Instantly share code, notes, and snippets.

@ifyoumakeit
Last active August 29, 2015 14:00
Show Gist options
  • Save ifyoumakeit/11181484 to your computer and use it in GitHub Desktop.
Save ifyoumakeit/11181484 to your computer and use it in GitHub Desktop.
Hide Next button and save results on Quiz
$(function(){
$(".xFieldRadioChoice").click(function(){
$(this).siblings().removeClass("clicked");
$(this).addClass("clicked");
$(".xActionNext").removeClass("xDisabled");
});
$(".xFormPages").on( 'cycle-after', function(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) {
$(incomingSlideEl).find(".clicked").length==0 ? $(".xActionNext").addClass("xDisabled") : $(".xActionNext").removeClass("xDisabled");
if($(incomingSlideEl).hasClass("last")){
$(".xActionNext").css("display","none");
$(".xSubmit").show();
}else{
$(".xActionNext").css("display","inline-block");
$(".xSubmit").hide();
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment