How to run script on switching tabs of tabbed layout group.

I have a tabbed layout group having 3 tabs in it. On switching tabs, I want to run a javascript function.

How to achieve this?

@MinaalM2 In each dynamic layout inside the layout group, you can configure the action set to perform a ‘Run Script on Click’ action.

@MinaalM2 Provide an action set on each tab of the tabbed layout group as below combination:

Click → Run Script