If you don’t need the change to animate then you don’t need to use any special plugins – I’d just use the native JavaScript window.scrollTo()
method — passing in 0, 0
will scroll the page to the top left instantly.
window.scrollTo(xCoord, yCoord);
Parameters
- xCoord is the pixel along the horizontal axis.
- yCoord is the pixel along the vertical axis.
Related Posts:
- Scroll to an element with jQuery
- Scroll to an element with jQuery
- Generate pdf from HTML in div using Javascript
- How to terminate the script in JavaScript?
- Get selected value in dropdown list using JavaScript
- scrollIntoView Scrolls just too far
- Clearing localStorage in javascript?
- Scroll Automatically to the Bottom of the Page
- How to ‘minify’ Javascript code
- ++someVariable vs. someVariable++ in JavaScript
- How to check whether a Button is clicked by using JavaScript
- Get a random item from a JavaScript array
- JavaScript: IIF like statement
- Getting DOM element value using pure JavaScript
- How do I select text nodes with jQuery?
- How to disable scrolling temporarily?
- How to scroll an HTML page to a given anchor
- jQuery scrollTop() method not working
- How to get scrollbar position with Javascript?
- How to scroll to top of page with JavaScript/jQuery?
- Empty functions in Javascript
- Google Calendar API event insert always return 404 “not found” error
- How to add a class to a given element?
- Using getline() with file input in C++
- How to make a word underline in Markdown
- What does enctype=’multipart/form-data’ mean?
- await is only valid in async function
- Remove duplicate values from JS array [duplicate]
- How to read an external local JSON file in JavaScript?
- How do I remove version tracking from a project cloned from git?
- How can I convert a string to boolean in JavaScript?
- Short circuit Array.forEach like calling break
- How can I check for an empty/undefined/null string in JavaScript?
- display variable image using cookies
- WinSCP: Permission denied. Error code: 3 Error message from server: Permission denied
- Find an element in DOM based on an attribute value
- With jQuery, how do I capitalize the first letter of a text field while the user is still editing that field?
- Pass a JavaScript function as parameter
- IE11 prevents ActiveX from running
- How to execute AngularJS controller function on page load?
- Dealing with float precision in Javascript
- org.hibernate.exception.SQLGrammarException: could not extract ResultSet
- How to execute a JavaScript function when I have its name as a string
- How to get the ASCII value in JavaScript for the characters [duplicate]
- HTML img onclick Javascript
- Clear the cache in JavaScript
- error Unable to get property ‘display’ of undefined or null reference
- Is there a php echo/print equivalent in javascript
- navigator.geolocation.getCurrentPosition sometimes works sometimes doesn’t
- /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
- Expected ‘this’ to be used by class method
- Unexpected token < in first line of HTML
- Running time of algorithm A is at least O(n²) – Why is it meaningless?
- ngular is automatically adding ‘ng-invalid’ class on ‘required’ fields
- How do I check if a Key is pressed on C++
- How to set “style=display:none;” using jQuery’s attr method?
- Await is a reserved word error inside async function
- Javascript WP Object Documentation?
- Show only images and videos in a wp.media window
- WordPress Rest API
- Instantiate TinyMCE via JS ( rather than PHP/wp_editor )
- How to prevent loading of all plugin’s resources?
- Dynamically changing navigation links (next and previous) via AJAX
- API JSON Data in WordPress
- Creating an Exit Confirmation Popup
- Search user metadata with checkboxes via ajax (almost working)
- Help with AJAX front end comment moderation
- Only displaying zip files with wp media
- Open div inside a custom post-type with Fancybox
- Save the post parent in a custom post type in Gutenberg
- Screen Resolution Detect
- wp_dropdown_categories() scripts working erratically on sidebar
- Override do_item() Function to Add Extra Attribute to Scripts
- Is it possible to pass js variable to template file
- Is there a loading priority for login_enqueue_scripts?
- Gutenberg Blocks: how to determine an index of the current inner block?
- WordPress theme resource won’t load over VPN
- Add to cart – button should be disabled
- Send Array from JS to php file then insert it in wp database through a plugin
- Get localize of a loaded javascript
- How to override Plugin javascript function : $(‘body’).on(‘change’,’.class’)
- Connect / Login WordPress Hosted Website or Blog with NodeJs
- How To Tell If a Custom Field Was Made with ACF, Metabox.io, Carbon Fields, Custom Built, etc?
- Plural Forms error in Query Monitor
- Filtering markers on google map by WordPress category[SOLVED]
- show just own posts of custom-post-type to wordpress user
- How to verify that a field has a value before adding a term to a taxonomy
- scroll scrpit to particular button position to next id when click button
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- Creating a user ‘add custom field’ section
- Javascript not working
- Facebook share button only share the_permalink(), without thumbnail, tilte, excerpt, etc
- Include Facebook Javascript SDK In WordPress
- WordPress shortcode plugin not working
- FacetWP: Plugin breaks button/modal functionality inside searchable content area
- Jquery dropdown menus working locally, but not in WordPress [duplicate]
- Physically locating the server
- Good tools that fit on a thumb drive [closed]
- How do you answer yes for yum install automatically
- All servers flooded by salt water, is it possible to recover data from multi-platter drives?