Here is a code snippet that I came across:
$('li input:checked').click(function() {
$(this).parent().parent().toggleClass("uncheckedBoxBGColor", 1000);
});
This code is functioning correctly when the element is clicked for the first time. It smoothly fades the background color, but on subsequent clicks, it delays for 1000 ms before flashing to the other background color. My goal is to have the animation trigger every time the element is clicked, not just the first time, regardless of whether or not it already has the designated class applied.