Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Using jQuery you can use <code>.height()</code>, <code>.innerHeight()</code> or <code>.outerHeight()</code>.</p> <p>The differences are:</p> <ul> <li><code>height()</code> returns just the height of the element, no borders, no margins and no padding</li> <li><code>innerHeight()</code> returns the element height and the padding</li> <li><code>outerHeight()</code> returns the element height, the padding and borders</li> <li><code>outerHeight(true)</code> returns the element height, the padding, borders and margins</li> </ul> <p>I have more details including output examples using jsFiddle in this post <a href="https://stackoverflow.com/a/11248902/448144">here</a>.</p> <p>For width you can use <code>width()</code>, <code>innerWidth()</code> or <code>outerWidth()</code>.<br> The same logic applies as with height.</p> <p>All values are in pixels.</p> <p>To get the height/width you can use it similar to this: </p> <pre><code>// The below is an example, you need to add your element references as required. // Use height(), innerHeight() or outerHeight() as needed. var newHeight = $("#slider-wrapper").height(); // Use width(), innerWidth() or outerWidth() as needed. var newWidth = $("#slider-wrapper").width(); </code></pre> <p>To set the height/width you can use it similar to: </p> <pre><code>// The below is an example, you need to add your element references as required. var newHeight = $("#slider-wrapper img").height(newHeight); var newWidth = $("#slider-wrapper img").width(newWidth); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload