How may I use Firebug to view attributes of jQuery-retrieved objects at a breakpoint?
For in开发者_StackOverflow中文版stance, 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()'. :(
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.
you can add the expression to a watch window the watch window shows the value when the variables are in scope
精彩评论