I am working with wordpress. I am trying to hide the add to cart button on the product page until the customer answers all the questions. The plugin I use provides options for the custom to select. Step 1 Step 2 Step 3 etc. When they get to the last step the "Continue" button deactivates/disables and the class changes to .owl-next button disabled
So I am trying to use that class as a trigger to show the add to cart button at the time and hide it until that class is active. So Far I am able to hide the add to cart button but I cant get the add to cart to show then. Here are the codes I tried so far in the header.
<script>
var aVisible = $('.owl-next.button').css('display');
if (aVisible == 'none') {
}
</script>
<script>
if($('.owl-next.button').length){
$('.single_add_to_cart_button.button.alt').hide();
}`enter code here`
</script>
<div class="owl-nav"><a class="owl-prev button">Back</a><a class="owl-next button disabled">Continue</a></div>
<button type="submit" name="add-to-cart" value="267" class="single_add_to_cart_button button alt">Add to cart</button>
Changes on last step:
<div class="owl-nav"><a class="owl-prev button">Back</a><a class="owl-next button disabled">Continue</a></div>
<button type="submit" name="add-to-cart" value="267" class="single_add_to_cart_button button alt">Add to cart</button>