thargenediad
thargenediad

Reputation: 13

How may I use Firebug to view attributes of jQuery-retrieved objects at a breakpoint?

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()'. :(

Upvotes: 1

Views: 156

Answers (2)

Rony
Rony

Reputation: 9511

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

Upvotes: 0

Nick Craver
Nick Craver

Reputation: 630607

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.

Upvotes: 1

Related Questions