Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
99
rated 0 times [  103] [ 4]  / answers: 1 / hits: 26915  / 13 Years ago, tue, may 31, 2011, 12:00:00

$(#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)?


More From » jquery

 Answers
78

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.)


[#91942] Monday, May 30, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
deonkalvinw

Total Points: 409
Total Questions: 96
Total Answers: 89

Location: Saint Pierre and Miquelon
Member since Sun, Nov 27, 2022
2 Years ago
deonkalvinw questions
Sun, Feb 6, 22, 00:00, 2 Years ago
Tue, Dec 28, 21, 00:00, 2 Years ago
Sun, Aug 22, 21, 00:00, 3 Years ago
Sun, Mar 7, 21, 00:00, 3 Years ago
;