Currently when using the jstools tabs the contents of all tabs on a single page are loaded at the same time. This might be fine for pages that are all text or the like, but if you have 6-8 tabs and have different types of content loading in each tabs, whether nodes, or what have you, it can get rather unwieldy. I have a short function, unfortunately written for prototype that should resolve the issue, but one of you jquery gurus are going to have to port it and add it to the "onclick" functionality for the tabs module. This function was used to load trial survey results in tabs on another project and was written by a friend. the functionality should translate just fine.
function GetTrialResults(trial){
if(!$(trial + '_trial').style.display){
function DisplayTrialResults(AjaxResult){$(trial + '_trial_results').innerHTML = AjaxResult.responseText;}
new Ajax.Request('/modules/lms/v2/lms_training_ajax.inc',{method: 'get', parameters: 'action=Trial%20Results&trial_id=' + trial, onComplete: DisplayTrialResults});
}else{$(trial + '_trial_results').innerHTML = '<img src="/template/images/icons/ajax-loader.gif"> Loading...';}
}
Comments
Comment #1
nedjoComment #2
yngens commentedinterested in this since http://drupal.org/node/146918 does not really solve the issue