Skip to content

Commit b1b5140

Browse files
author
wangaz
committed
Also open initially opened tab when using history back (see #2).
1 parent ba4431d commit b1b5140

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/assets/jquery-ui-tabs/core-uncompressed.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@
4444
},
4545

4646
toggle: function(hash) {
47-
var index = this._getIndex(hash);
47+
var index;
48+
49+
// open first tab on empty hash
50+
if (hash == '') {
51+
index = 0;
52+
} else {
53+
index = this._getIndex(hash);
54+
}
4855

4956
if (index >= 0)
5057
{
@@ -68,4 +75,4 @@
6875

6976
$('section.ce_tabs').tabs('toggle', hash);
7077
});
71-
})(jQuery);
78+
})(jQuery);

src/assets/jquery-ui-tabs/core.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)