Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: de.comp.lang.javascript Subject: Re: jQuery 1.5.2 und jQuery 1.6.4 Date: Fri, 1 Jul 2016 19:35:19 +0200 Organization: solani.org Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1467394514 19089 eJwFwQcBwEAIBDBLxyzIeZZ/CU1MnLw/dXO1s5vd5Xo5dVOZIbbVcH/uc6+Fn3dgTCYOS+ppMP6oKhSS3Iw1KtOHCaZoSUGqxAI2hx/XFR4W (1 Jul 2016 17:35:14 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 1 Jul 2016 17:35:14 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 X-User-ID: eJwFwYEBwDAEBMCViPd0HCL2H6F3blTeAJ3w9TX04UR9CEmYzp5+F8rN51mFkzIOdAmzhT8QKBCb In-Reply-To: Cancel-Lock: sha1:CLerb6RJ4luQQ3fRQ7UgSPnhzGM= X-NNTP-Posting-Host: eJwFwQcBwEAIBDBL7IKcZ5x/CU1cg2M+Cw9zOExbs9X10HC6o7pI7h4KbrxX6oLMtXgjwjsrgoHVB6ZYAkXFmVRz0yeWtlqelDXPl3+sAR4j Xref: csiph.com de.comp.lang.javascript:4752 Am 01.07.2016 um 18:46 schrieb Robert Berghaus: > Ich benutzte jQuery, um mir für einen Container clientWidth und > clientHeight zu holen: > $( '#Container' ).attr( "clientWidth") > > Das funktioniert mit der Version 1.5.2 (und früher) noch, ab der > 1.6er wohl nicht mehr. Mit jQuery 1.6 wurde wohl endlich das fehlerhafte .attr() korrigiert. Ab da sollte .prop("clientWidth") funktionieren, siehe . Schließlich ist clientWidth eben kein (HTML-)Attribut, sondern eine (Objekt-)Eigenschaft. > Jetzt nehme ich dafür: > document.getElementById( "Container" ).clientWidth Spricht doch auch nichts dagegen, oder? -- Christoph M. Becker