I would like to be able to send the user to another page if they click Yes, I want More Traffic and close (hide) the entire section if they click No, I have Enough Traffic.
I was thinking about writing a function in the Files that will listen for an onClick event on the button, but I am hoping there is a more elegant way of doing it directly in the Divhunt UI.
This works great as I showed in the video, but on smaller breakpoints, it does not.
So instead β¦ I used jQuery to set the βstyleβ attribute, which sets the styling on the tag level and that overrides the classes coming from the breakpoint.
Here is my new code:
$(document).on('click', '.noIHaveEnoughTrafficButton', function() {
// Set the style attribute so it overrides any styles coming from a class
$('.moreTrafficQuestionCta').attr("style", "display: none;");
console.log("Button clicked");
})