]> source.dussan.org Git - jquery-ui.git/commitdiff
better performing check for base and href in IE
authorKlaus Hartl <klaus.hartl@googlemail.com>
Thu, 26 Feb 2009 21:39:44 +0000 (21:39 +0000)
committerKlaus Hartl <klaus.hartl@googlemail.com>
Thu, 26 Feb 2009 21:39:44 +0000 (21:39 +0000)
ui/ui.tabs.js

index 70ed54239c3ed73e1275cf6e1d5c94856e48b773..e65d4860d7c93f82b113ca386caa9c1a70b7b589 100644 (file)
@@ -87,9 +87,9 @@ $.widget("ui.tabs", {
                        // 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;
                        }