How to scroll (perfectly smooth scrolling) down so that the specified control is at the top of the screen? (i.e. how to bring the screen into the comments section so that the heading of the "comments" is at the top of the screen?)
Like this:
$('html, body').animate({ scrollTop: $(something).offset().top });
Alternatively, you can use the ScrollToplugin .
ScrollTo
Find a solution here: http://blog.freelancer-id.com/index.php/2009/03/26/scroll-window-smoothly-in-jquery
There is a ScrollTo plugin , which is quite popular. It is simple, simple:
$.scrollTo(...);
Source: https://habr.com/ru/post/1758954/More articles:I wrote the exact code in vb and C # and it does not work the same ... the logic is identical ... I hope - c #SQL вы можете использовать инструкцию IF в UDF и как вы это делаете? - sqltwistd in Twisted can not start in window - pythonHow can HRESULT appear in a MIDL file? - c ++Веб-безопасность - HTTP-Location = HTTP-Referrer, если внешний домен? Зачем? - securityC: What will be the statement "A" 1 'for A> 1? - cWhy doesn't Safari on iPad show a large jpeg wrapped in an IMG tag? - safariHow to encode XML on Android? - androidMac 'batchfile' script solution? - scriptingUnit Testing Examples for VS2010 Testing Tools - c #All Articles