-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.js
77 lines (71 loc) · 1.88 KB
/
scripts.js
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
function initParadoxWay() {
"use strict";
if ($(".fund-cards-carousel").length > 0) {
var j2 = new Swiper(".fund-cards-carousel .swiper-container", {
preloadImages: false,
slidesPerView: 1,
spaceBetween: 20,
loop: true,
grabCursor: true,
mousewheel: false,
centeredSlides: true,
pagination: {
el: ".tc-pagination",
clickable: true,
dynamicBullets: true,
},
navigation: {
nextEl: ".listing-carousel-button-next",
prevEl: ".listing-carousel-button-prev",
},
breakpoints: {
1024: {
slidesPerView: 3,
},
},
});
}
setInterval(function () {
var size = 1;
$(".bubbles").append(
'<div class="individual-bubble" style="left: ' +
1 +
"px; width: " +
size +
"px; height:" +
size +
'px;"></div>'
);
$(".individual-bubble").animate(
{
bottom: "100%",
opacity: "-=0.7",
},
4000,
function () {
$(this).remove();
}
);
}, 350);
}
$(document).ready(function () {
initParadoxWay();
});
$(".denomination").click(function (event) {
$(".denomination").removeClass("selected").prop("checked", false);
$(".denomination-other input").removeClass("selected").val("");
$(this).addClass("selected");
$(this).children(":first").prop("checked", true);
$("#d-button").text("Donate ₹" + $(this).children(":first").val());
});
$(".denomination-other input").on("keypress", function (event) {
var regex = new RegExp("^[0-9]+$");
var key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
if (!regex.test(key)) {
event.preventDefault();
return false;
}
$(".denomination").removeClass("selected").prop("checked", false);
$(this).addClass("selected");
$("#d-button").text("Donate ₹" + $(this).val() + key);
});