Greasy Fork is available in English.

confettijs.org

Confetti generator

< Commentaires sur confettijs.org

Avis: OK - le script fonctionne, mais souffre de quelques problèmes

§
Posté le: 19/04/2023
Édité le: 19/04/2023

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')

}

});

§
Posté le: 19/04/2023

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.

Poster une réponse

Connectez-vous pour poster une réponse.