jQuery set dynamic image height

jQuery(document).ready(function( $ ){
  var heightc = $(".top-ads-banner img").height();
    $(".top-ads-banner").height(heightc);
});

CSS

.top-ads-banner {
	position: sticky;
	top: 0;
	-webkit-transition: all 1.5s;
    -moz-transition: all 1.5s;
    -ms-transition: all 1.5s;
    -o-transition: all 1.5s;
    transition: all 1.5s;
	width: 100%;
	margin: 0 auto;
	background: #000;
	height: 0px;
}

Elementor Age gate verification

document.getElementById("dateofbirthsubmit").addEventListener('click',function ()
{
var dateString = document.getElementById('form-field-dateofbirth').value;
if(dateString !=='')
{
var today = new Date();
var birthDate = new Date(dateString);
var age = today.getFullYear() - birthDate.getFullYear();

if(age < 18 || age > Infinity)
{
elementorProFrontend.modules.popup.showPopup( {id:50}, event);
event.preventDefault();
}
}
else
{
alert("You must provide your date of birth!");
}
} );
https://elementor.com/academy/how-to-create-an-age-gate-popup-advanced-pro/