I'm not familiar with scrollspy, but the functionality you're after isn't that complex:
Adapting the function provided here this should give you a list of which elements in a set are currently visible. You can apply/remove whatever CSS classes you want given this information.
You can run this handler on the 'scroll' event in the browser, though you might want to 'throttle' or 'debounce' it. I believe there are jQuery plugins that provide the equivalent, but each of those is only a dozen lines of code or so.
function getVisible( $els ) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
return $els.filter(function(i, elem) {
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
// Fully or partially visible, pick one
// element is _fully_ visible
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
// element is _partially_ visible
return ((elemBottom <= docViewBottom) || (elemTop >= docViewTop));
});
}