views:

22

answers:

2

For instance, I've hit a break point on a line of code where I'm setting the height of one div equal to the height of another:

$("#box_left").height = $("#box_right").height;

How do I view the value of 'height'? All firebug ever shows me is 'function()'. :(

+1  A: 

You can do this to print the height in the console:

$("#box_left").height();

Also, to set it like you want, do this:

$("#box_left").height($("#box_right").height());

.height() without arguments returns the height, giving it a value sets the height.

Nick Craver
aaaaaahhhhhhh! Thank you so much! :)
Anton Thorn
@Anton - If this solved your problem, please click the check-mark beside this answer indicating that, same for future questions...it helps the next person with your problem that finds this quickly identify the solution :)
Nick Craver
Thanks for the advice. It's now been check-marked! :)
Anton Thorn
A: 

you can add the expression to a watch window the watch window shows the value when the variables are in scope

Rony