別の関数から「this」値を手動で渡す方法
jQuery
$('#divName ul li a').click(function() {
$(this).addClass('active');
});
$(window).scroll(function() {
//for condition a
//the value of this will a
//for condition b
//the value of this will be
});