I'm trying to have a vertical list of divs and that on scroll the next div gets the class active and the last rest does not.
Following is my try:
$(document).ready(function(){
$('#list').scroll(function() {
$('div').removeClass("active");
$(this).addClass("active");
});
});