r2135 - trunk/ui
r2135 - trunk/ui
Author: klaus.hartl
Date: Thu Feb 26 13:39:44 2009
New Revision: 2135
Modified:
trunk/ui/ui.tabs.js
Log:
better performing check for base and href in IE
Modified: trunk/ui/ui.tabs.js
==============================================================================
--- trunk/ui/ui.tabs.js (original)
+++ trunk/ui/ui.tabs.js Thu Feb 26 13:39:44 2009
@@ -87,9 +87,9 @@
// Same consideration applies for an added tab with a fragment
identifier
// since a[href=#fragment-identifier] does unexpectedly not match.
// Thus normalize href attribute...
-
- if (href.split('#')[0] == location.toString().split('#')[0] ||
- $('base').length && href.split('#')[0] == $('base')[0].href) {
+ var hrefBase = href.split('#')[0], baseEl;
+ if (hrefBase && (hrefBase === location.toString().split('#')[0] ||
+ (baseEl = $('base')[0]) && hrefBase === baseEl.href)) {
href = a.hash;
a.href = href;
}