I'm trying to hide an element once element has 'style="display:none"' removed.
My jQuery:
jQuery(document).ready(function(){
if (jQuery(".progressally-quiz-result-container").is(':visible')) {
jQuery(".progressally-quiz").css("display", "none");
} else {
jQuery(".progressally-quiz").css("display", "block");
}
});
I've also tried this, and it still fails:
jQuery(document).ready(function(){
if (jQuery(".progressally-quiz-result-container").is(":visible")) {
jQuery(".progressally-quiz").hide();
}
});
When a user subits on the final step 6 of the quiz), the .progressally-quiz
element doesn't get hidden like I'm trying to make it do.
Site: https://learn.lolapickett.com/empath-quiz/
UPDATE
I am able to now hide the quiz section using the following:
jQuery(document).ready(function(){
jQuery('.progressally-quiz-submit-button').click(function(){
jQuery('.progressally-quiz').css("display", "none");
});
jQuery('.progressally-quiz-reset-button').click(function(){
jQuery('.progressally-quiz').css("display", "block");
});
});
Unfortunately, it still hides the form if a user doesn't select an image answer on step 6. Not sure how to only hide the form element if the form validates.
Thanks!