$("#someDiv").attr("scrollHeight")
适用于所有浏览器的jquery 1.3.2.但是在更新到jquery 1.6.1时,它只适用于IE9.Firefox 4.0.1,Google Chrome 11和Safari 5都返回undefined.
$("#someDiv").get(0).scrollHeight
但仍适用于所有浏览器.
有人知道发生了什么吗?attr("scrollHeight")
在最新的jquery(即版本1.6.1)中被打破了吗?
我有一个高度div:100px和overflow:auto内容是动态的.
我想滚动底部的div
我试过了
$("#chat_content").scrollTop($("#chat_content").height());
Run Code Online (Sandbox Code Playgroud)
但如果内容大于100px $("#chat_content").height()返回100并且div不在底部滚动
我能怎么做?
谢谢