malihu/page-scroll-to-id — pull request #1 by brightgarden (2013-10-27 18:01:38+00:00)
Title: Change callback context to scrollTargetElement and pass original event object

Would like the callback function to receive the original event object (e) in order to reference the clicked element. Also would like the context to be the target element (this) in order to do additional things at the target, like focus elements.

Example:

$("a[rel='m_PageScroll2id']").mPageScroll2id({
"scrollSpeed":"2000",
"autoScrollSpeed":"true",
"scrollEasing":"easeInOutExpo",
"scrollingEasing":"easeInOutCirc",
"pageEndSmoothScroll":"true",
"layout":"vertical",
"callback": function(e){
var clickedElement = $(e.target),
targetElement = $(this);
clickedElement.addClass("bump");
targetElement.highlight();
}
});