91-9990449935 0120-4256464 |
jQuery height()The jQuery height() method is used to return the current computed height for the first element or set the height of every matched element. In other words, you can say that the height() method is used for two purposes: To return height: When this method is used to return height, it returns the height of first matched element. To set height: When this method is used to set height, it sets height of all matched elements. This method is a very common jQuery dimension. The before() and insertBefore() both methods are used to perform same task. The main difference between them is in syntax, and the placement of the content and the target.Syntax: To return the height: To set the height: To set the height by using a function: Parameters of jQuery height() method
Example of jQuery height() methodLet's take an example to demonstrate the jQuery height() method. To return Height: Test it Now jQuery height() example 2To set height:
This example will show how to set a specific height. Test it Now
Next TopicjQuery innerWidth()
|