Little update to the active tab using hash from URL, forgot to add a check if the hash is valid, fixed this now
This commit is contained in:
parent
bcb74d01b6
commit
b3f35c579b
1 changed files with 5 additions and 3 deletions
|
|
@ -481,10 +481,12 @@ $(function() {
|
|||
var changeTab = function()
|
||||
{
|
||||
var hashtag = window.location.hash;
|
||||
|
||||
var tab = $('#tabs a[href="' + hashtag + '"]');
|
||||
tab.tab("show");
|
||||
onTabChange(hashtag);
|
||||
if (tab.length)
|
||||
{
|
||||
tab.tab("show");
|
||||
onTabChange(hashtag);
|
||||
}
|
||||
}
|
||||
|
||||
//~~ view model binding
|
||||
|
|
|
|||
Loading…
Reference in a new issue