I have a .click()
event on an element. After it's closed, this mob has a transition that happens and an AJAX call that goes through. That's all that happens.
What I need is a callback to put inside the .click()
function to execute when both of those things are done, even if transitions aren't supported. Here's a timeline:
jQuery needs to wait for the ajax call and the transition, then execute the callback after the ajax call has completed AND the transition has either finished or not happened at all.
How can I do this? Thanks!
NOTE: I'm using $.ajax()
for the ajax call and a normal CSS3 transition on the element in question. I can detect transitionEnd with javascript event binding, I have a variable setup for that called transitionEnd and another variable that detects if the browser support transitions call supportsTrans.