.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Code Snippets >> JQuery >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Get the height and width using JQuery

Posted By:Amit Mehra       Posted Date: March 11, 2010    Points: 10    Category: JQuery    URL: http://www.dotnetspark.com  

Get the height and width of an element using JQuery in asp.net with Height() and Width() function.

if you would like to get the height and with of an element of HTML or asp.net control at the run time using JQuery than you can use height() for height and width() function to get width.

Lets see an example to get height

$("#myDiv").height();// this will give you the height

and to get the width of an element

$("#myDiv").width(); // this will give width of an html object


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend