Jquery

jQuery Intro

jQuery Intro Quiz

jQuery Intro Exercise

jQuery Basic

jQuery Basic Quiz

jQuery Basic Exercise

jQuery Advance

jQuery Advance Quiz

jQuery Advance Exercise

jQuery Selectors

jQuery Effects

jQuery Events

jQuery Methods and Properties

jQuery Traversing

jQuery CSS and HTML Methods

jQuery height() Method

jQuery height() Method

 

 

The height() method is used to set or return the height of the selected elements.

 

For your Information:-

 

  1. When it is used to set height, it will set the height of ALL matched elements.
  2. When it is used to return height, it will only return the height of the first matched element.

 

Some of its relative methods are width(), innerWidth(), innerHeight(), outerWidth(), and outerHeight().

 

Syntax:-

 

Its syntax is:- $(selector).height(value) OR $(selector).height(function(index, currentheight))

 

Further Explanation:-

 

Parameter Description
value Required for setting height.
function(index,currentheight) Optional. Specifies a function that returns the new height of selected elements
  • index - Returns the index position of the element in the set
  • currentheight - Returns the current height of the selected element

Code Explanation

All Tutorials related to jQuery CSS and HTML Methods

All Sections related to Jquery