UI Tabs - Automatically initialize inline links to activate tabs

UI Tabs - Automatically initialize inline links to activate tabs

Hi,
The following line, when added to the UI Tabs init() method, just prior to the event handler binding, causes all links with href attributes equivalent to those in tab nav to become tied to the tab nav automatically.
<span style="font-family: courier new,monospace;">this.$lis.each(function(){var
tab=$('a[href]',this);$('a[href='+tab.attr('href')+']').each(function(){if(this!=tab){$(this).click(function(){tab.trigger(o.event+'.tabs');/*this
should probably scroll to the top of the appropriate tab
nav*/window.scrollTo(0,0);return false;});}});});</span>
This thereby reduces the need for selecting tabs from text links via the method described in the documentation:
<a href="http://docs.jquery.com/UI/Tabs#...select_a_tab_from_a_text_link_instead_of_clicking_a_tab_itself">http://docs.jquery.com/UI/Tabs#...select_a_tab_from_a_text_link_instead_of_clicking_a_tab_itself</a><br clear="all">
A diff is attached... <span style="font-family: courier new,monospace;"></span>Cheers!
<span style="font-family: courier new,monospace;"></span>--
Jake Kronika
 Owner, Web Designer & Developer
 Gridline Design
 <a href="http://www.gridlined.com">www.gridlined.com</a>
Mobile: 773-458-4048
Email:
 <a href="mailto:jkronika@gmail.com">jkronika@gmail.com</a>
 <a href="mailto:info@gridlined.com">info@gridlined.com</a>