I'm using the jQuery UI-tabs and rather than activate them onclick I am using :hover to change tabs. I would like for the link to take the user to the URL that is specified in the rel attribute, but I'm coming up empty handed in trying to find a solution.
+2
A:
How about:
function hoverEventHandler(){
window.location.href = $(this).attr("rel");
}
Tzury Bar Yochay
2009-10-26 07:12:04
Exactly what I was looking for. Thank you.
Greg-J
2009-10-26 08:20:44
A:
you can bind hover event to the links and select specific tabs based on hovered element:
$("a.tab_links").hover(function(){
var $tabs = $('#example').tabs();
var selected = $tabs.tabs('select', 2);//select third tab.
});
You can use selected
callback for opening link:
$('#example').tabs({
select: function(event, ui) {
var lnk = ui.tab;
var href = $(lnk).attr("rel");
OPEN_LINK(href);//write function or code for this
return false;//don't open on clicking on link;
}
});
PS:- this stuff is from jquery ui tabs documentation page.
TheVillageIdiot
2009-10-26 07:43:42