Scroll on bottom divs [closed]

十年热恋 提交于 2019-12-13 10:18:38

问题


I am working on my own chat. And on one main window I have more chat windows(divs). And I want when I load my main windows, that my chat divs was scrolled on bottom. Have you any solutions?


回答1:


$('#div1').scrollTop($('#div1')[0].scrollHeight);

this is your solution :D

http://jsfiddle.net/emx9D/




回答2:


There's a number of different jQuery solutions that do this, take a look at them here

The general gist of it, is browser detects you're at the bottom of the page, do an ajax query, append onto page.



来源:https://stackoverflow.com/questions/17695726/scroll-on-bottom-divs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!