javascript scroll to top
//Instant scroll to top of page
window.scrollTo(0, 0);window.scroll({
top: 0,
left: 0,
behavior: 'smooth'
});$("a[href='#top']").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
}); $("#scroll_icon").click(function()
{
jQuery('html,body').animate({scrollTop:0},2000);
})window.scrollTo(x-coord, y-coord);
Also in JavaScript:
- access to xmlhttprequest at angular 8
- javascript foreach key value
- two object combine together javascript
- adding a terminal iframe
- arrow functions javascript
- falsy values javascript
- javascript function declaration
- js refresh button
- momentjs docs
- check if a class exists javascript
- html navbar dropdown bootstrap
- what data type is a {} i njs
- Iterate with JavaScript While Loops
- how to call a function in react with arguments onclick
- javascript check alpha and space only
- check if all elements in array match a condition javascript
- javascript true string to boolean
- js get first letter of string
- react arrays
- insert item into array specific index javascript
- current date in javascript
- js conditional array element
- javascript for loops
- movable gui javascript