Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set container height to a div height + add 100 pixels

Tags:

jquery

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 :)

like image 296
pufAmuf Avatar asked Jan 18 '23 18:01

pufAmuf


1 Answers

Maybe add a literal 100?

$(".container").width('1052').height($(".right").height()+100);
like image 177
sidyll Avatar answered Feb 15 '23 10:02

sidyll