Home>

There are two ways to write on the scroll top for asynchronous communication in jquery.

Applicable source code
1
var hoge = target.offset (). top;
jQuery (''). animate ({scrollTop: position}, speed, 'swing');
2
('') .append (html) .animate ({scrollTop: $('') [0] .scrollHeight}, '500');
Supplemental information (FW/tool version etc.)

We are doing the environment development of rails5 and both are working in the same way

Serakuta etc. have been omitted