I have a hidden div, .model-detail-panel, which opens when I click .span.
$('[class*="span"]').on('click', function () { $(this).parent().next('.model-detail-panel').slideToggle() });
I want to include .animate () in this code to scroll the screen so that the top of the opened div is at the top of the window.
How can i achieve this?
Thanks in advance.
source share