我有以下脚本:
$('.how-we-do-it .items div').on('click', function () {
var $matchingDIV = $('.how-we-do-it .sections .section .content div.' + $(this).attr('class'));
$matchingDIV.toggle('fast');
});
我一直在尝试添加一些额外的代码,以便页面自动向下滚动到被切换的 $matchingDIV。
我一直在尝试使用 scrollTop 和 Smooth Scroll 插件来完成此操作,但我无法让它与我的 $matchingDIV 输出一起使用。
完成此任务的最简单方法是什么?