For a simple plain JavaScript implementation:
window.onbeforeunload = function () {
window.scrollTo(0, 0);
}
More Related Contents:
- How to display an chage photo option on mouse hover similar to linkedin using Javascript? [closed]
- How to send data to the server via Ajax?
- How to force browser to show image 3 inches wide?
- Making a quiz in HTML and Javascript [closed]
- HTML: how refresh information in [closed]
- HTML Form Submit pass array to PHP [closed]
- Add/Remove Class of Nav Objects on Page Scroll
- How to find certain text in HTML
- Where should I put tags in HTML markup?
- How to save an image to localStorage and display it on the next page?
- Get class name using jQuery
- JQuery ajax progress via xhr
- Make function wait until element exists
- How do you detect the clearing of a “search” HTML5 input?
- How to convert html table to excel with multiple sheet?
- How to defer inline Javascript?
- Jquery .show() not revealing a div with visibility of hidden
- How to check if input file is empty in jQuery
- Fill available spaces between labels with dots or hyphens
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- The data-toggle attributes in Twitter Bootstrap
- Extracting text from a contentEditable div
- minimise the code since I am using the same code only the content in p tags changes and component AccordionHeader header changes
- Rotate div text after clicking on button using jquery and css
- How to properly unload/destroy a VIDEO element
- How to hide optgroup/option elements?
- how to use html2canvas and jspdf to export to pdf in a proper and simple way
- Hot to get incomplete datetime-local input values
- Do duplicate ID values screw up jQuery selectors?
- Can you have multiple lines in an element?