confettijs.org

Confetti generator

< Feedback on confettijs.org

Review: ياخشى - قوليازما ئىشلەيدۇ، بىراق خاتالىق بار

§
يوللانغان ۋاقتى: 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')

}

});

Robin Findleyئاپتور
§
يوللانغان ۋاقتى: 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.

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.