Hi, i've got a div with overflow:auto. I want to check whether the content of the div is higher than the div itself (in order to know whether I need to show a "scroll down" link or not).
In Internet Explorer with jQuery 1.2.2. I can get the contents height without any problem with: $("#div").contents().height() (I don't know if this is the best way to do it, but it's the only one I found...) The problem is, in Firefox it doesn't work and all I get is the following error message: Fehler: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://www.rakuun.de/Stuff/Schasler/jquery-1.2.2.js :: anonymous :: line 853" data: no] Quelldatei: http://www.rakuun.de/Stuff/Schasler/jquery-1.2.2.js Zeile: 853 You can try it out yourself here: http://www.rakuun.de/Stuff/Schasler/content_height_test.html Any idea how to fix this or how to get the contents height in a way that works in both browsers?