Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.javascript > #4752

Re: jQuery 1.5.2 und jQuery 1.6.4

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From "Christoph M. Becker" <cmbecker69@arcor.de>
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 <nl69ki$ikh$1@solani.org> (permalink)
References <dtnl3gFm8o0U1@mid.individual.net>
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 <dtnl3gFm8o0U1@mid.individual.net>
Cancel-Lock sha1:CLerb6RJ4luQQ3fRQ7UgSPnhzGM=
X-NNTP-Posting-Host eJwFwQcBwEAIBDBL7IKcZ5x/CU1cg2M+Cw9zOExbs9X10HC6o7pI7h4KbrxX6oLMtXgjwjsrgoHVB6ZYAkXFmVRz0yeWtlqelDXPl3+sAR4j
Xref csiph.com de.comp.lang.javascript:4752

Show key headers only | View raw


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
<https://blog.jquery.com/2011/05/03/jquery-16-released/>.  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

Back to de.comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

jQuery 1.5.2 und jQuery 1.6.4 Robert Berghaus <Robert.Berghaus@gmx.de> - 2016-07-01 18:46 +0200
  Re: jQuery 1.5.2 und jQuery 1.6.4 "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-07-01 19:35 +0200
    Re: jQuery 1.5.2 und jQuery 1.6.4 Robert Berghaus <Robert.Berghaus@gmx.de> - 2016-07-02 15:47 +0200

csiph-web