Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add clickable link for tabs
  • Loading branch information
nathanlct authored Jul 25, 2019
commit af71b6369f65508cda365a34c7cea625a348f72e
23 changes: 21 additions & 2 deletions assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,27 @@ $(document).ready(function($){


$(document).ready(function(){
var $tab = $(window.location.hash);

if($tab.length != 1) {
$tab = $("#tutorials"); // default tab
}
$tab.siblings().removeClass('active');
$tab.addClass('active');

var $tabs = $('.tabs, .navs');
var $tabIndex = $tab.index(),
$tabContent = $tabs.children('.tab-contents').children().eq($tabIndex),
$indicator = $tabs.children('.nav-bar').children(".indicator");

$tabContent.siblings().removeClass('active');
$tabContent.addClass('active');

$indicator.css({
left: $tab.position().left,
right: $tabs.children('.nav-bar').outerWidth() - ($tab.position().left + $tab.outerWidth())
});

if($('.tabs, .navs').length){

// Function for active tab indicator change
Expand Down Expand Up @@ -177,8 +198,6 @@ $(document).ready(function(){





////////////////////////////////////////
//
// Parallax Background
Expand Down