forked from Yajon/donate-page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
38 lines (32 loc) · 911 Bytes
/
script.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
jQuery(document).ready(function() {
var QRBox = $('#QRBox');
var MainBox = $('#MainBox');
var AliPayQR = '/images/AliPayQR.png';
var qqQR = 'https://alpha-q3.sourcegcdn.com/2022/09/13/m8WnY9Z8.png'
function showQR(QR) {
if (QR) {
MainBox.css('background-image','url('+QR+')');
}
$('#DonateText,#donateBox,#github').addClass('blur');
QRBox.fadeIn(300,function(argument) {
MainBox.addClass('showQR');
});
}
$('#donateBox>li').click(function(event) {
var thisID = $(this).attr('id');
if (thisID === 'AliChat') {
showQR(AliPayQR);
} else if (thisID === 'qq') {
showQR(qqQR);
}
});
MainBox.click(function(event) {
MainBox.removeClass('showQR').addClass('hideQR');
setTimeout (function(a) {
QRBox.fadeOut(300,function(argument) {
MainBox.removeClass('hideQR');
});
$('#DonateText,#donateBox,#github').removeClass('blur');
},600);
});
});