height

English [haɪt] American [haɪt]

n. Height; height, altitude; highland; extreme, vertex

jquery height() method syntax

Function:height() method returns or sets the height of the matching element.

Return height:Return the height of the first matching element. If no arguments are set for this method, the height of the matching element in pixels is returned.

Syntax:$(selector).height()

Set the height:Set the height of all matching elements.

Syntax:$(selector).height(length)

##Parameters:

Parameter Description length Optional. Specifies the height of the element. If no length unit is specified, the default px unit is used.

#Use a function to set the height:Use a function to set the height of all matching elements.

Syntax:$(selector).height(function(index,oldheight))

Parameters:

jquery height() method example

    

This is a paragraph.

Run instance »

Click the "Run instance" button to view the online instance

About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!
Parameters Description function(index,oldheight) Specifies to return the new height of the selected element function. index Optional. Accepts the index position of the selector oldvalue Optional. Accepts the current value of the selector.