Skip to content

Commit 3c4e40d

Browse files
committed
Removed regex from function and split return into two lines.
1 parent eef633e commit 3c4e40d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/jquery.ui.tabs.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@
1313
*/
1414
(function( $, undefined ) {
1515

16-
var tabId = 0;
16+
var tabId = 0,
17+
rhash = /#.*$/;
18+
1719
function getNextTabId() {
1820
return ++tabId;
1921
}
2022

2123
var isLocal = function( anchor ) {
22-
var rhash = /#.*$/;
2324
// clone the node to work around IE 6 not normalizing the href property
2425
// if it's manually set, i.e., a.href = "#foo" kills the normalization
2526
anchor = anchor.cloneNode( false );
26-
return anchor.hash.length > 1 && anchor.href.replace( rhash, "" ) === location.href.replace( rhash, "" );
27+
return anchor.hash.length > 1 &&
28+
anchor.href.replace( rhash, "" ) === location.href.replace( rhash, "" );
2729
};
2830

2931
$.widget( "ui.tabs", {

0 commit comments

Comments
 (0)