Hi Malav,
That will work too, but it may create some conflict as it is getting the size of an image, if there are multiple images you may need to add a class to the image and mention that in place of x-img in the code and your code will look like the following one.
jQuery(document).ready(function($){
jQuery(".entry-content .scrollarea").css('height', jQuery(".entry-content .test .x-img").height());
});
In the above code, test is a class that has been added to the image element to avoid conflict. You need to may need to add a different classes for different text element and you need to mention it in your code too.
Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes which means we can’t fix it in case it conflicts with something on your site nor will we enhance it. Further customization should be directed to a third-party developer or you can avail One, where we answer the questions beyond normal theme support.
Thanks