Skip to content

Commit bdd628b

Browse files
authored
add tabs fix (#13417)
1 parent 259a8c3 commit bdd628b

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

docs/_includes/scripts/article.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,28 @@
2525

2626
$(document).ready(function () {
2727

28-
/* Versions Pagination*/
29-
$('.pagination_big').owlCarousel({
30-
margin:10,
31-
nav:true,
32-
dots:false,
33-
responsive:{
34-
0:{
35-
items:3
36-
},
37-
400:{
38-
items:4
39-
},
40-
500:{
41-
items:6
42-
},
43-
1600:{
44-
items:11
45-
}
46-
}
47-
});
28+
try{
29+
/* Versions Pagination*/
30+
$('.pagination_big').owlCarousel({
31+
margin:10,
32+
nav:true,
33+
dots:false,
34+
responsive:{
35+
0:{
36+
items:3
37+
},
38+
400:{
39+
items:4
40+
},
41+
500:{
42+
items:6
43+
},
44+
1600:{
45+
items:11
46+
}
47+
}
48+
});
49+
} catch(e){}
50+
4851
});
4952

docs/_includes/scripts/programmingLanguageSwitcherScalaPython.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function tabs({tabsWrapperSelector, tabsParentSelector, tabsSelector, tabsConten
4545
tabsLi.forEach((item, i) => {
4646
if(target == item) {
4747
hideTabsContent();
48-
showTabContent(i);
48+
try{showTabContent(i);}catch(e){}
4949
}
5050
});
5151
}
@@ -91,4 +91,11 @@ tabs({
9191
tabsSelector: '.tab-li-model-aproach',
9292
tabsContentSelector: '.tabs-python-scala-box',
9393
activeClass: 'tabheader_active'
94+
});
95+
tabs({
96+
tabsWrapperSelector: '.tabs-box',
97+
tabsParentSelector: '.tabs-model-aproach-head',
98+
tabsSelector: '.tab-li-model-aproach',
99+
tabsContentSelector: '.tabs-box .highlighter-rouge',
100+
activeClass: 'tabheader_active'
94101
});

0 commit comments

Comments
 (0)