Alex Onsman has Published 203 Articles

How to set scrolltop position in jQuery?

Alex Onsman

Alex Onsman

Updated on 10-Dec-2019 06:16:20

8K+ Views

To set scrolltop position in jQuery, use the scrollTop() method. The scrollTop( ) method gets the scroll top offset of the first matched element. This method works for both visible and hidden elements.ExampleYou can try to run the following code to set scrollTop() method in jQuery:Live Demo       ... Read More

How to scroll to element in horizontal div using jQuery?

Alex Onsman

Alex Onsman

Updated on 10-Dec-2019 06:14:49

2K+ Views

To scroll to element in horizontal div, use the scrollleft.ExampleYou can try to run the following code to learn how to scroll to element in jQuery:Live Demo               jQuery Scroll                         ... Read More

When to use $(document).ready() and when $(window).load() in jQuery?

Alex Onsman

Alex Onsman

Updated on 30-Jul-2019 22:30:20

866 Views

$(window).load()Use $(window).load(), when you want the code inside it to run only once the entire page is ready (not only DOM).  It executes when the page is fully loaded, including frames, objects and imagesNote: The load() method deprecated in jQuery version 1.8. It was completely removed in version 3.0. To ... Read More

Advertisements