Reputation: 198
%ul.nav.nav-tabs
%li.active
%a{ :href => "#a", "data-toggle" => "tab" }
%li
%a{ :href => "#b", "data-toggle" => "tab" }
How can I call jQuery click function on the second tab?
Upvotes: 1
Views: 1062
Reputation: 21
$('.nav-tabs li').eq(1).click(function(){alert("test")})
or if you want to call click
event:
$('.nav-tabs li').eq(1).click()
Upvotes: 2
Reputation: 1175
$('#b').parent().click(function(){alert("test")});
I think this is what you mean.
Upvotes: 0