I have a funnel in clickfunnels that in the footer section i added a script for making a toggle hide/show a specific section that is basically invisible and show up only with the image-button.
My problem is that i can't figure out how to jump on the section when it shows up(Smoothly)
This is the piece of code that does the toggle:
var toggle;
function docReady(fn) {
if (document.readyState === "complete" || document.readyState === "interactive") {
setTimeout(fn, 1);
} else {
document.addEventListener("DOMContentLoaded", fn);
}
}
docReady(function() {
toggle = true;
});
$("#tmp_image-67696").click(function(e) {
e.stopPropagation();
if(toggle) {
$("#row--91312").css("display","block");
toggle = !toggle;
} else {
$("#row--91312").css("display","none");
toggle = !toggle;
}
});
Basically I want the same image-button that toggles and show the section, to jump the view onto the same section, not just shows it like dropdown.
Thanks in advance!