You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dimension related methods returns or sets content width or height according to dimension method. Except setting `width` and `height` methods, all other usages break the chaining.
301
+
302
+
```js
303
+
let el =uxr(selector);
304
+
305
+
// returns the first elements content width
306
+
// note that: this return only the content width, no-border, no-padding, no-margin
307
+
el.width();
308
+
el.contentWidth(); // alias method
309
+
310
+
// sets the width of elements in the uxr object.
311
+
// similar method to el.css('width', value);
312
+
el.width('100px');
313
+
el.contentWidth('100%');
314
+
315
+
// returns the clientWidth of the first element
316
+
// note that: this is only differs from width method with addition of padding
317
+
el.innerWidth();
318
+
el.clientWidth(); // alias method
319
+
320
+
321
+
// returns the offsetWidth of the first element
322
+
// note that: this calculates width with border, padding and content-width altogether
323
+
el.outerWidth();
324
+
el.offsetWidth(); // alias method
325
+
326
+
// returns the offsetWidth of the first element including margins
327
+
// note that: this calculates width with margin, border, padding and content-width altogether
328
+
el.outerWidth(true);
329
+
el.offsetWidth(true); // alias method
330
+
331
+
// returns the first elements content height
332
+
// note that: this return only the content height, no-border, no-padding, no-margin
333
+
el.height();
334
+
el.contentHeight(); // alias method
335
+
336
+
// sets the height of elements in the uxr object.
337
+
// similar method to el.css('height', value);
338
+
el.height('100px');
339
+
el.contentHeight('100%');
340
+
341
+
// returns the clientHeight of the first element
342
+
// note that: this is only differs from width method with addition of padding
343
+
el.innerHeight();
344
+
el.clientHeight(); // alias method
345
+
346
+
347
+
// returns the offsetHeight of the first element
348
+
// note that: this calculates height with border, padding and content-height altogether
349
+
el.outerHeight();
350
+
el.offsetHeight(); // alias method
351
+
352
+
// returns the offsetHeight of the first element including margins
353
+
// note that: this calculates height with margin, border, padding and content-height altogether
0 commit comments