jquery tabs with hover and rotate
Trying to use tabs to automatically rotate and if a tab is hovered over to stop the rotation and select the specified tab and then go back to rotation after mouseover ends.
$(document).ready(function(){
$('#banner').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 3000);
$('#banner').hover(function(){
$(this).tabs().tabs('rotate', 0, false);
var $tabs = $('#banner').tabs();
var selected = $tabs.tabs('option', 'selected');
$tabs.tabs('select', selected);
return false;
},function(){
$(this).tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 3000);
}
);
});
This works with roration starting/stopping but i can't get the tab selected on mousehover, any ideas?