This seems pretty simple, but I can't seem to figure it out. I want to change the background color of the element that was scrolled to using the ScrollTo plugin for JQuery. I'm using the onAfter setting. This is what I have:
$("#nav-inpage").localScroll({
target:'body',
offset: -50, // compensate for static super-nav
hash: true,
onAfter:function(){
$(this.hash).css('background-Color' , '#ff0000');
}
});
If I change this.hash to just this, the background of the target (body) turns red. So how do I address the hash that I'm scrolling to?