Hey there, I have a bit of a silly question, but I could really use some help!
I'm facing an issue with changing the height of a div using jQuery by adding values. Instead of adding up, they are just lining up one after another. Wondering if anyone else has encountered this problem before?
Here's my code snippet:
jQuery( document ).ready(myfunction);
$(window).resize(myfunction);
function myfunction() {
var divH = $('.container').css("height");
divH = divH .replace(/px/g, "");
var innerH = parseInt(divH) + 130;
$('.divRight').css("width", innerH);
}
For instance, if the .container height is 100px, the expected output should be 230px (100+130), but instead, it shows 100130.
If you have any insights on why this might be happening, I would greatly appreciate your input!
Thank you in advance!