jQuery HTMLLesson 20Free preview
jQuery Dimensions
This lesson is part of jQuery · All levels
Summary
The group of Dimensions methods is used to measure and change the size of elements, such as width(), height(), innerWidth(), and outerWidth(). The difference lies in the calculation of padding and border: the inner adds padding, while the outer adds padding and border. This method is useful for dynamic layouts such as panels and galleries.
Key points
- Width() and height() return the size of the content in pixels
- InnerWidth() and innerHeight() including padding
- OuterWidth() and outerHeight() including padding and border
- Calling without an argument is a readable, with numbers being a transformative.
- Measurements useful for calculating dynamic position and size
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.