Reputation: 7805
I have this function
$(".container").width('1052').height($(".right").height());
And in the function the .container height is set by the .right height. Well, I also always want to add a 100 pixels to that number. How would I achieve that?
Is this possible without creating a separate variable? Thanks :)
Upvotes: 4
Views: 9519
Reputation: 59307
Maybe add a literal 100?
$(".container").width('1052').height($(".right").height()+100);
Upvotes: 8
Reputation: 12506
$(".container").width('1052').height($(".right").height() + 100);
Upvotes: 1