Search
Other Tabs & Accordions questions
Forum

onclick

bwd's Avatar bwd
Hi Peter:

Is there a way do an onclick when a tab is clicked? I have some google charts in a tab (using plotalot) and when the browser is resized when the tab is closed the charts don't get resized. I was hoping to do something like this:
{tab title="QuickLook" color="blue" onclick="plotalot_resize();"}

If you look here and move to another tab (say Marine), then resize the browser then return to QuickLook, the charts don't get resized properly:
Confidential information:
(hidden)


I have tried:
document.getElementById("rlta-quicklook").onclick = function(event) {
    plotalot_resize();
}

I know this isn't a Tabs issue but I'm hoping you have an idea of how to run a javascript function when a specific tab is clicked.

Thanks,
Dave
Peter van Westen's Avatar Peter van Westen ADMIN
You can try:
document.getElementById('rlta-quicklook').addEventListener('rlta.open', () => {
    plotalot_resize();
});
Please post a rating at the Joomla! Extensions Directory
bwd's Avatar bwd
Ah perfect, thank you sir.
Dave
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription