Massimiliano Marini wrote:
Hi all,
I'm using the amazing jQuery tabs plugin, but I'm having problem
with this code:
$('#container-1').tabs(2,{
fxFade: true,
fxSpeed: 'fast',
onClick: function() {
alert("Clicked!");
}
});
I know this code is wrong, but I want enable the event onClick only on
a specific tab. How I can do it ... if is possible?
Currently there is no way to attacha callback to a specific tab, but you
can check the clicked tab inside the callback:
onClick: function(clicked) {
var $tabs = $(clicked).parents('ul:eq(0)').find('a');
if ($tabs.index(clicked) == 1) {
alert("Clicked 2nd tab!");
}
}
--Klaus