update
This commit is contained in:
29
public/template_5/js/custom.js
Normal file
29
public/template_5/js/custom.js
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
// TABS JS
|
||||
|
||||
function makeTabActive() {
|
||||
|
||||
var url = window.location.href;
|
||||
|
||||
var indexof = url.indexOf("#");
|
||||
|
||||
if (indexof > 0) {
|
||||
|
||||
var activeTab = url.substring(indexof + 1);
|
||||
|
||||
if (typeof activeTab != 'undefined' && activeTab != '' && activeTab != '#') {
|
||||
|
||||
// to dispaly give tab content
|
||||
|
||||
jQuery(".tab-pane").removeClass("active in show");
|
||||
|
||||
jQuery("#" + activeTab).addClass("active in show")
|
||||
|
||||
// to make active given tab
|
||||
|
||||
jQuery(".nav-tabs li a").removeClass("active");
|
||||
|
||||
jQuery(".nav-tabs li a[href='#" + activeTab + "']").addClass("active");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user