i want to sum the outerheight() value of a div with the padding-top value of another div. here's my function
var headerHeight = $('header').outerHeight() + "px";
console.log(headerHeight);
var containerPT = $(".container").css('padding-top');
console.log(containerPT);
var totalSpace = (headerHeight + containerPT);
console.log(totalSpace);
and the result is:
//headerHeight
474px
//containerPT
150px
//totalSpace
474px150px
the result i need is of course 474 + 150 = 624px; I usually sum stuff with ease, I'm not sure why this is happening and what I am doing wrong. any help greatly appreciated.