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;
}