Course Content

  • 5.1 get_height
  • 5.1 get_width
  • 5.1 innerHeight
  • 5.1 innerWidth

Course Content


There are five different types of jQuery dimension methods:

  • getHeight()
  • getWidth()
  • getDepth()
  • getMaxHeight()
  • getMaxWidth()

The jQuery dimension methods can be used to set the height and width of an element on a webpage. These two values can either be set as pixel values or as percentages of the window size or viewport size. The main difference between these two is that pixel values will always show up at a certain size no matter what device is being viewed on whereas percentages will adjust accordingly for any device.

  • jQuery dimension methods are used to find out the dimensions of an element. jQuery offers a number of dimension methods with different purposes and each one has a slightly different syntax.
  • The length() method returns the width or height of an element, depending on which parameter it is passed. The width() method returns the width of an element, while the height() method returns the height.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere