From: Klaus Hartl Date: Thu, 26 Feb 2009 21:39:44 +0000 (+0000) Subject: better performing check for base and href in IE X-Git-Tag: 1.7~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e744869d8f5d70a2e4b8d6aea90bfd201836aaca;p=jquery-ui.git better performing check for base and href in IE --- diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js index 70ed54239..e65d4860d 100644 --- a/ui/ui.tabs.js +++ b/ui/ui.tabs.js @@ -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; }