Hello to all
There is such jQuery code:
var parent = $(this).parents('.work-examples__li'); var tarGet = parent.find(".example"); var activeBlock = parent.find(".work-examples__li_active"); var tarGetHeight = tarGet.height(); if (!tarGet.hasClass('pop-up')) { tarGet.addClass('pop-up'); activeBlock.addClass('visible'); parent.css("padding-bottom", 'tarGetHeight') When executed, parent gets style = "" (the variable is not readable for some reason), and if I remove the brackets
parent.css("padding-bottom", tarGetHeight) then padding gets 0px;
What could be the problem?