mirror of https://github.com/jkjoy/sunpeiwen.git
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
|
<script>
|
||
|
jQuery(document).ready(function () {
|
||
|
var QRBox = $('#QRBox');
|
||
|
var MainBox = $('#MainBox');
|
||
|
var AliPayQR = '<%= theme.reward.AliPayQR %>';
|
||
|
var WeChanQR = '<%= theme.reward.WeChatQR %>';
|
||
|
|
||
|
function showQR(QR) {
|
||
|
if (QR) {
|
||
|
MainBox.css('background-image', 'url(' + QR + ')');
|
||
|
}
|
||
|
$('#donateBox').addClass('blur');
|
||
|
QRBox.fadeIn(300, function (argument) {
|
||
|
MainBox.addClass('showQR');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
$('#donateBox>li').click(function (event) {
|
||
|
var thisID = $(this).attr('id');
|
||
|
if (thisID === 'AliPay') {
|
||
|
showQR(AliPayQR);
|
||
|
} else if (thisID === 'WeChat') {
|
||
|
showQR(WeChanQR);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
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);
|
||
|
|
||
|
});
|
||
|
});
|
||
|
</script>
|