I'm using the following to scroll to the last <li>
in an unordered list:
$("html,body").animate({scrollTop: $('ul#cart-items li').offset().top});
How can I change this to scroll to the last <li>
in the unordered list, but also offset it about 30px from the top?
Have you tried this:
$("html,body").animate({scrollTop: $('ul#cart-items li:last').offset().top - 30});
but + or - the 30 at the end to achieve your desired offset?