Fixing jQuery Animate Flickering
I just spent over a hour wrestling with this bug, and I'm hoping this post will help spare someone else the same pain. The problem that I ran into was an annoying flicker when using the jQuery .animate() function to change the opacity of a DOM node. I did a bunch of Googling, but none of the solutions worked for me. I tried: Calling e.preventDefault() in the event handler. Using return false; in the event handler (this was being done already). Calling .stop(true, true) on the node being animated. Calling .off() on the animated node to remove all event handlers What ended up working for me was removing a CSS transition from the element being animated . The code in question (simplified): listing.animate({opacity: 0}, function() { // some code }); The listing element had the following CSS rules applied (simplified by removing vendor prefixes): .listing-card { background: #fff; position: relative; border: 1px solid #ec...