Here's the current jQuery code I'm trying to use
$("ul.nav.nav-tabs li.active a").each(function(){
switch(this.hash) {
case "#core":
alert("Core");
break;
case "#parallel":
alert("Parallel");
break;
case "#cron_settings":
alert("Cron Settings");
break;
}
})
Here's the HTML Markup I'm using also
<ul class="nav nav-tabs">
<li class="active"><a href="#core" data-toggle="tab">Core Settings</a></li>
<li><a href="#parallel" data-toggle="tab">Parallel settings</a></li>
<li><a href="#cron_settings" data-toggle="tab">Cron limit settings</a></li>
</ul>
When the active
class changes, I need it to basically re-run the switch()
as it's only being performed once on the document.ready
, how can I get it to re-run the switch()
? possibly using change()
?