[jQuery] UI Tabs bug

[jQuery] UI Tabs bug


synopsis: UI.tabs faisl hard when there is no UL for which to apply tabs.
I have an admin section for which I'm using a tabbed nav bar. But, in
a few pages, the UL does not appear (by design). Because I have this
line in my admin.js:
$('#nav_admin').tabs({ ... });
... jQuery is coming to a screeching halt with this error:
-- snip --
Error: c has no properties
Source file: http://cake_elan.apollo/js/lib/jquery-1.2.6.js
Line: 662
-- snip --
I traced it to this line in _tabify()
$.data(a, 'load.tabs', a.href);
To fix, I needed to wrap that block in my admin.js with:
if ($('#nav_admin ul').length) { ... }
Solution: UI.tabs needs to fail gracefully when there is no UL
available to apply tabs to.