$("#someDiv").attr("scrollHeight")
works in jquery 1.3.2 for all browsers. But on updating to jquery 1.6.1, it only works in IE9.
Firefox 4.0.1, Google Chrome 11 and Safari 5 all return undefined.
$("#someDiv").get(0).scrollHeight
however still works for all browsers.
Anybody knows what is going on?, is attr("scrollHeight")
broken in the newest jquery (i.e version 1.6.1)?
jQuery 1.6 introduced .prop
and changed the meaning of .attr
.
Read all about it.
(Always worth checking the documentation first; the page for .attr
talks about this too.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With