-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
80 lines (76 loc) · 2.27 KB
/
Copy pathscript.js
File metadata and controls
80 lines (76 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
jQuery(document).ready( function($){
// Code for year month toggle
$('#toggle-btn').click(function(id) {
var toggle_btn = $('#toggle-btn');
if($(toggle_btn).is(':checked')) {
$(".price-duration").text("/year")
$(".check-monthly").css("font-weight", "500");
$(".check-yearly").css("font-weight", "600");
const newAmounts = {
'beginner-amount': '199',
'advance-amount': '499',
'ultimate-amount': '999'
};
// set new amounts using the same class
for (const id in newAmounts) {
$(`#${id}`).text(newAmounts[id]);
}
} else {
const oldAmounts = {
'beginner-amount': '19',
'advance-amount': '99',
'ultimate-amount': '199'
};
// set old amounts using the same class
for (const id in oldAmounts) {
$(`#${id}`).text(oldAmounts[id]);
}
$(".price-duration").text("/month")
$(".check-monthly").css("font-weight", "600");
$(".check-yearly").css("font-weight", "500");
}
})
// View more/less functionality
$(".pricing-card").each(function() {
var view_more = $(this).find(".view-more");
var more_features = $(this).find(".more-features")
$(view_more).click(function() {
$(more_features).slideToggle();
if ($(view_more).text() == "View More") {
$(view_more).addClass("rotate")
$(more_features).css("display", "block");
$(view_more).text("View Less");
} else {
$(view_more).removeClass("rotate")
$(view_more).text("View More");
}
})
})
if ($(window).width() <= 991) {
$(".pricing-slider").addClass("owl-carousel").addClass("owl-theme");
$('.pricing-slider').owlCarousel({
loop: false,
nav: false,
dots: false,
autoHeight: false,
autoplay: false,
responsive: {
0: {
items: 1,
margin: 10,
stagePadding: 15,
},
576: {
items: 1,
margin: 10,
stagePadding: 50,
},
768: {
items: 1,
margin: 0,
stagePadding: 120,
}
}
});
}
});