Estou tendo problema com os botões de minha clonagem
Caso você esteja tendo problemas com os botões da página, botões que não funcionam, especialmente após a troca de elementos você pode copiar e colar o seguinte script nos "Scripts Personalizados";
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("a").click(function(){
//It's not clear if you want the href attribute or the text() of the <a>
//this gives you the href. if you need the text $(this).text();
var number = this.href;
window.location.replace(number);
});
});
</script>
Caso você tenha problemas com o efeito de rolagem dos botões de uma página você deve usar esse script;
<style type="text/css">*, html {scroll-behavior: smooth !important;}</style>
<script>
function toAnchorJS(element){
window.scrollBy({
top: document.querySelector(element).offsetTop,
behavior: "smooth",
});
}
window.onload = () => {
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
var tempHref = anchor.getAttribute('href');
anchor.setAttribute('href', 'javascript:toAnchorJS("'+tempHref+'");');
});
}
</script>