This seems to be the same as my question: jquery ui tabs load event does not fire
but the solution provided doesn't work for me.
my code:
<script type="text/javascript">
$(document).ready(function(){
$( "#tabs" ).bind( "tabsload", function(event, ui) {
alert("ok");
changeheight();
});
$("#tabs").tabs({
load: function(event, ui){
alert("load");
changeheight();},
cache: true});
});
function changeheight(){
alert("changeheight");
var iframe = document.getElementById("#iframe1");
var htmlheight = iframe.contentWindow.document.body.scrollHeight;
alert(htmlheight);
$("#iframe1").height(htmlheight+"px");
}
</script>
<div id="tabs">
<ul style="padding: 0; margin: 0;">
<li class="context-tab" ><a href="#iframe1" id="recent-tab" >Recent</a></li>
</ul>
<iframe id="iframe1" src="/canvas/getstories?context=recent" style="width:95%;">
</iframe>
As you can see, I'm trying it both ways, but neither is working.