Hi,
I want to set the css of one tab navigation button programmaticaly. The index of the tab should be a variable.
Use case: Setting a button to color red when it content has changed ascync.
Thanks!!
Hi,
I want to set the css of one tab navigation button programmaticaly. The index of the tab should be a variable.
Use case: Setting a button to color red when it content has changed ascync.
Thanks!!
Give your tab divs ids as tab-0
, tab-1
, tab-2
, etc; the following should work -
var $tabs = $('#example').tabs();
var selected = $tabs.tabs('option', 'selected'); // retrieve here or pass it to function.
$("#tab-" + selected ).addClass('myClass');