confettijs.org

Confetti generator

< 脚本confettijs.org的反馈

评价:一般 - 脚本能用,但还有一些问题

§
发表于:2023-04-19
编辑于:2023-04-19

Confetti is not working inside the function or click event
and it does not show any error in console


$('.confetti').click(function(e) {
let voucherVal = $('.voucher-input').val()
if (voucherVal == '') {
$('.error-msg').removeClass('d-none')
$('.success-msg').addClass('d-none')
} else {
let confetti = new Confetti('btn');
$('.error-msg').addClass('d-none')
$('.success-msg').removeClass('d-none')

}

});

§
发表于:2023-04-19

Yeah, it's not my code, and I found the same thing. I simply copied it from confettijs.org to GreasyFork so I could link it into a userscript for testing (the original site isn't configured to allow cross-site linking).

Anyway, the documentation is really lacking. I did eventually get it to work, but the code is only designed to make confetti pop out of a button, which is not how I wanted to use it. So, I'm writing my own alternative that only borrows from the general concept of confettijs. If you'd like, I can post a reply to you again to let you know if/when I post my own confetti module. It may be a while, though. I only have a few minutes to spare occasionally.

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址