0

REALLY basic stuff here. Pretty new to jQuery. I'm trying to add two values (these happen to be the total height of two sidebars. I use alert for each and receive the correct height. But, when I try to add these together, I get the [object Object] return.

To make this utterly basic, which is where I am, what am I not doing? It seems logical enough but doesn't work.

var sbheight1 = jQuery(".sidebar1").height();
var sbheight2 = jQuery(".sidebar2").height();
var sbtotal = jQuery (sbheight1 + sbheight2);
alert (sbtotal);

Help appreciated. Keep it simple for this humble beginner.
Thanks.

2
Contributors
2
Replies
15
Views
3 Years
Discussion Span
Last Post by gcarterm_1
0

Egods, Troy, to paraphrase, Syntax, Syntax, Syntax! Yeah, that worked. I've been looking for a couple days, trying all kinds of exotic solutions. It's this simple. Thank you VERY much.

Mike

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.