In my page there are a number of tabs and I want to show the content of tab by giving fade effect. In order to do this I need the tab divs which has a class name of sectionContent after fade function to be style="display:block". However when I look at them from firebug it is shown as for example:
<div id="lesson-grammar" class="sectionContent" style="">
and so the tab is not shown. How can I do that? thanks a lot.
new Ajax.Request(ajaxUrl,
{
method:'post',
onSuccess: function(data){
var tmp=data.responseText;
$$('.exercise-main .content').invoke('insert',tmp);
$$('.exercise-main .sectionContent').invoke('setStyle','display:none');
$('lesson-'+tab).fade({
from:0,
to:1,
afterFinish: function(){
//do the job
}
});
}
});
<div class="exercise-main">
<div class="content">
<div id="lesson-discussion" class="sectionContent">
...
</div>
<div id="lesson-grammar" class="sectionContent">
...
</div>
<div id="lesson-dialogue" class="sectionContent">
...
</div>
</div>
</div>