I have a situation like so:
I have a button with an ember action that causes a route change, with corresponding DOM updates. This DOM is also being watched by a mutation observer. What I want to do is run some jquery code after the user clicks the button but before the mutation observers fire. However currently the mutation observer is always firing before the jquery onClick is fired.
How can I achieve my desired order? Should I use a deferred promise in the observer?
来源:https://stackoverflow.com/questions/29216434/how-to-get-a-jquery-onclick-to-fire-the-same-time-as-ember-click-and-before-muta