var h = $("#content").height();
var w = $("#content").width();
- Richard
On Tue, Nov 3, 2009 at 4:39 PM, JamaicaMan
<williambradley.rouse@...> wrote:
I am trying to find the dimension of a <div> named "content" and print
them to my screen.
I am getting the top and left, but not the width and height. Here is
what I have written so far:
$(document).ready(function(){
var p = $("#content");
var position = p.position();
var h = $("#content").height($("body").width);
var w = $("#content").width($("body").width);
$("#content").text( "//n left: " + position.left + ",
top: " + position.top);
$("#content").text( "/n");
$("#content").text( "width: " + w + "height: " + h);
...