Thread:Project:Support desk/link scroll position/reply (10)

I was hoping to modify the click event that is already occurring, but I could not find it.

This code was added to the jQuery function of vector.js and is providing the results I needed. It adds an animated scroll and offsets the scrollTop position of the anchor.

$('div#bodyContent a').click(function(e) {	if ($(e.target.hash)) {		var hash = e.currentTarget.hash.substring(1);		var anchorTag = $("span[id='" + hash + "']");		$('html, div#content.mw-body').animate({ scrollTop : anchorTag.offset.top - 152 }, 250);	} });