我需要通过另一个函数的回调中的方法发送一个变量。变量应该是单击的导航链接。这里不是无力解释,而是代码。逻辑是错误的,但你会明白的。
/* Make a variable out of which link was clicked */
$('nav a').click(function(){
var $nav = $(this);
});
$('nav').localScroll({
duration: 500,
easing:'easeOutSine',
axis:'xy',
onAfter: function(){
/* send that variable through aktivator() in the callback of localScroll() */
$nav.aktivator();
}
});