Here i have bunch of div's with some related contents.
I want to adjust the scroll position to a closest div
How can i do this using jQuery
JQuery
$(".item").scroll( function( ) {
$(".item").css({ top: $(this).scrollTop( ) });
});
Could anyone help me,
Thanks in Advance.
Here you go. You have to do a couple of things.
JavaScript
The "scroll end detection" is coming from yckart's answer to jQuery scroll() detect when user stops scrolling. All timings from this example can be adjusted to your needs.
Demo
Try before buy