i try to do following:
on click re-sizing a divs height matching to the divs content height ( the content is through "overflow:hidden" hidden )
the content of the div is responsive ( means if the window width changes the divs content height changes, too.
on click changing the divs (.video) height to match the divs content (.video-container) height:
$('.video').click(function()
{
$(this).animate(
{
height:$('.video .video-container').height()
});
});
this works pretty well, but if I resize the window the height of .video-container changes, and I need to resize .video onesmore.
this is everything I already got:
video:
<div class="video">
<div class="video-container">
<div class="flowplayer">
<video preload='none'>
<source type="video/mp4" src="video.mp4"/>
</video>
</div>
</div>
</div>
javascript:
$(document).ready(function()
{
$('.video').click(function()
{
$(this).animate(
{
height:$('.video .video-container').height()
});
});
Link removed - ( found solution and everything works now )
If you click on the first black container it extends, after that you'll note if you re-size the browser the video gets smaller, but the container stays big. i hope this clarifies the problem.