You can save the current scroll amount and then set it later:
var tempScrollTop = $(window).scrollTop();
..//Your code
$(window).scrollTop(tempScrollTop);
More Related Contents:
- When we using alert vs popup div tag? [closed]
- Dynamically adding div on button click and changing Id of each?
- How to change the href attribute for a hyperlink using jQuery
- jQuery Get Selected Option From Dropdown
- How to take screenshot of a div with JavaScript?
- How to detect Ctrl+V, Ctrl+C using JavaScript?
- How to show Page Loading div until the page has finished loading?
- Jquery load() only working in firefox?
- Play an audio file using jQuery when a button is clicked
- How to close an open collapsed navbar when clicking outside of the navbar element in Bootstrap 3?
- Use images like checkboxes
- How to manually trigger validation with jQuery validate?
- Drop-down box dependent on the option selected in another drop-down box
- Getting Bootstrap’s modal content from another page
- Sort an html list with javascript
- Run change event for select even when same option is reselected
- How can I generate the opposite color according to current color?
- JQuery Slider, how to make “step” size change
- How to swipe top down JQuery mobile
- Best way to execute js only on specific page
- jQuery: Slide left and slide right
- JavaScript: get code to run every minute
- jQuery animated number counter from zero to value
- How to use SimplePagination jquery
- jQuery, image changing on hover [duplicate]
- How to Bootstrap navbar static to fixed on scroll?
- How to use pagination on HTML tables?
- How to highlight a part part of an Input text field in HTML using Javascript or JQuery
- Test if an element can contain text
- Geolocation closest location(lat, long) from my position