“Role até o top js” Respostas de código

JavaScript Roll para o topo da página

//Instant scroll to top of page
window.scrollTo(0, 0);
TC5550

JavaScript vai para o topo da página

window.scroll({
 top: 0, 
 left: 0, 
 behavior: 'smooth' 
});
Mobile Star

JS role até o topo

// this changes the scrolling behavior to "smooth"
window.scrollTo({ top: 0, behavior: 'smooth' });
Lazar

SCROOL TO TOP JQUERRY

$("a[href='#top']").click(function() {
  $("html, body").animate({ scrollTop: 0 }, "slow");
  return false;
});
Strange Swan

JavaScript vai para o topo da página

window.scroll({top: 0, left: 0});
//Or with jQuery
$('html,body').scrollTop(0);
//with animation
$('html, body').animate({ scrollTop: 0 }, 'fast');
Matteoweb

Role até o top js

const scrollToTop = () => window.scroll(0,0)
Noob Dev

Respostas semelhantes a “Role até o top js”

Perguntas semelhantes a “Role até o top js”

Mais respostas relacionadas para “Role até o top js” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código