I am using a commenting script similar to Disqus. I embed the iFrame in some pages, including a Modal. I set scrolling to no and want to display the content of iFrame source in full without scrolling. I can do this by setting the iFrame height to some large number. However, I need this to be dynamic, I need to figure out the height of the content of the iFrame, or have the container shrinks in height depending on source content. How do I do that. I tried number of JQuery functions around and none seems to work.
Preparing iframe code
html = "<div class='ui items'><div class='item'><div class='ui tiny
image'><img class = 'th mini-img' style = 'height:50px; width:50px;'
src='"+img+"'></div><div class='middle aligned content'><a
class='header'>"+name+"</a><div class='meta'><span class='cinema'><?php
echo $this->__('Inspiration by Visitor');?></span></div></div></div>
</div>";
Putting iframe in a modal made by semantic-ui framework, on a click to some button
<div class="ui long modal" id="easycomment_modal">
<div class="header">
Profile Picture
</div>
</div>
<div class="description">
<div class="ui header">We've auto-chosen a profile image for you.</div>
<div class="cmt_contain"></div>
</div>
</div>
<div class="actions">
<div class="ui positive right labeled icon button">
Yep, that's me
<i class="checkmark icon"></i>
</div>
</div>
</div>