开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜