Reputation: 1399
I couldn't find what I'm doing wrong here...
I'm trying to apply some effect on the selected <li>
of the navigation, I'm getting the index of it but I can't apply anything on it :
$("#tabs").bind('tabsselect', function(event, ui) {
var choosen = ui.index;
console.log(choosen);
$('#tabs ul').find('li:eq(choosen)').toggleClass('selectedone');
});
Upvotes: 0
Views: 79
Reputation: 636
at a guess it looks like you are sending the string choosen to the find function rather than the value of choosen - so I would say you need to try instead
$('#tabs ul').find('li:eq(' + choosen + ')').toggleClass('selectedone');
Upvotes: 1