I am using domtab on my site . ( between 'TOUS LES FILMS' and 'AFFICHAGE HORAIRE' ) However the height is not automatically set, that is why I am trying to use jquery to modify it each time I click to them.
Here is the HTML structure of the tab
<div id="domtab1" class="domtab">
<ul class="domtabs">
<li><a id="fl1A" href="#t1">TOUS LES FILMS</a></li>
<li><a id="fl1B" href="#t2">AFFICHAGE HORAIRE</a></li>
</ul>
<div class="flip1A" id="fli1A">
<h2><a name="t1" id="t1"></a></h2>
<ol class="rounded-list">
<li><a href="#">Spiderman</a></li>
<li><a href="#">Pokemon</a></li>
<li><a href="#">X men</a></li>
<li><a href="#">Blanche Neige</a></li>
</ol>
<p><a href="#top">back to menu</a></p>
</div>
<div id="fli1B" class="flip1B" >
<h2><a name="t2" id="t2"></a></h2>
<div class="heading2">
<hr class="gradient_one" />
<p class="hours_gradient">12h10</p>
</div>
<ol class="rounded-list">
<li><a href="#">Spiderman</a></li>
<li><a href="#">Pokemon</a></li>
</ol>
...
<p><a href="#top">back to menu</a></p>
</div>
</div>
And here are the jquery code I tried but none worked:
$('#fl1B').on("click", function (e) {
var maxHeight2 = document.getElementById("fli1B").scrollHeight;
$("#text_var").html(maxHeight2);
$("#flip-tabs").css({
'height': maxHeight2 + 'px'
});
});
$("#fl1B").click(function () {
var maxHeight2 = document.getElementById("fli1B").scrollHeight;
$("#text_var").html(maxHeight2);
$("#flip-tabs").css({
'height': maxHeight2 + 'px'
});
});
$('#fl1B').live('click', function () {
var maxHeight2 = document.getElementById("fli1B").scrollHeight;
$("#text_var").html(maxHeight2);
$("#flip-tabs").css({
'height': maxHeight2 + 'px'
});
});