Tab onclick?

rss

Posted by holtonba - May 5 ’14 at 04:33

Is there a way to run some javascript when a tab is clicked? We have a bunch of tabs and would like to know which tab is clicked so that an HTML element can be set dynamically.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 10 years 11 days
    #1 by Dmitry Kozlov May 6 ’14 at 04:44

    Sure, put the following code into JS-editor of Forms Designer:

    $('#fd_tabcontrol-0').on('tabsactivate', function(event, ui) {
      alert('New tab: ' + ui.newTab.text());
      alert('Previous tab:' + ui.oldTab.text())
    });
    
Displaying 1 to 1 of 1 messages