By default the script is properly initialized as soon as the document's DOM is ready to be manipulated, which for anyone on a non dial up connection should be virtually instantaneous (unless your page is super long). So the # of people affected by this is probably very small.
One quick change you can make to the script is to alert a message when the associated buttons are clicked on and the script has yet to initialize fully, instead of return a JavaScript error. Inside the .js file, you'd add the code in red below:
Code:
showhide:function(divid, action){
if (!this.divholders[divid].$divref){
alert("Please try again after page has loaded")
return false
}
var $divref=this.divholders[divid].$divref //reference collapsible DIV
if (this.divholders[divid] && $divref.length==1){ //if DIV exists
var targetgroup=this.divgroups[$divref.attr('groupname')] //find out which group DIV belongs to (if any)
if ($divref.attr('groupname') && targetgroup.count>1 && (action=="show" || action=="toggle" && $divref.css('display')=='none')){ //If current DIV belongs to a group
if (targetgroup.lastactivedivid && targetgroup.lastactivedivid!=divid) //if last active DIV is set
this.slideengine(targetgroup.lastactivedivid, 'hide') //hide last active DIV within group first
this.slideengine(divid, 'show')
targetgroup.lastactivedivid=divid //remember last active DIV
}
else{
this.slideengine(divid, action)
}
}
},
Bookmarks