I can’t figure out why this is not working.
I’m just trying to scroll the .toggle container to top after the .toggle-box finsihed the animation.
jQuery(".toggle").click(function(){
jQuery(".toggle-box").slideToggle(), function() {
jQuery("html,body").animate({scrollTop: jQuery(".toggle").offset().top}, 500)
};
});
Be sure to pass the scrolling callback as an argument to the
slideTogglefunction: