We use the tabifier javascript from barelyFitz in a few places in MethodBox. However, I wanted it to have a different, more descriptive tooltip than the tab title. The default code doesn’t seem to do this so I added a couple of little changes to make this happen.
You can see the complete file here but below is a quick synopsis of the changes:
added a boolean to keep track of whether you want a different tooltip than the tab title:
this.differentTooltip = true;
if this isn’t the behaviour you wanted then that’s ok:
if (!this.differentTooltip) {
t.headingText = t.div.title;
}
however, if the tooltip is to be different then make sure the
link for the tab is correct:
if (this.differentTooltip) {
DOM_a.title = t.tooltipText;
} else {
DOM_a.title = t.headingText;
}