/**
* WEBSITE: https://themefisher.com
* TWITTER: https://twitter.com/themefisher
* FACEBOOK: https://www.facebook.com/themefisher
* GITHUB: https://github.com/themefisher/
*/
// Preloader js
function preloader() {
'use strict';
$('.preloader').delay(100).fadeOut(10);
}
$(preloader);
(function ($) {
'use strict';
// tab
$('.tab-content').find('.tab-pane').each(function (idx, item) {
var navTabs = $(this).closest('.code-tabs').find('.nav-tabs'),
title = $(this).attr('title');
navTabs.append('
' + title + '');
});
$('.code-tabs ul.nav-tabs').each(function () {
$(this).find('li:first').addClass('active');
});
$('.code-tabs .tab-content').each(function () {
$(this).find('div:first').addClass('active');
});
$('.nav-tabs a').click(function (e) {
e.preventDefault();
var tab = $(this).parent(),
tabIndex = tab.index(),
tabPanel = $(this).closest('.code-tabs'),
tabPane = tabPanel.find('.tab-pane').eq(tabIndex);
tabPanel.find('.active').removeClass('active');
tab.addClass('active');
tabPane.addClass('active');
});
// Accordions
$('.collapse').on('shown.bs.collapse', function () {
$(this).parent().find('.ti-plus').removeClass('ti-plus').addClass('ti-minus');
}).on('hidden.bs.collapse', function () {
$(this).parent().find('.ti-minus').removeClass('ti-minus').addClass('ti-plus');
});
})(jQuery);