#7548 closed feature (duplicate)
trigger order
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It would be nice if you can add a parameter for the bind method, to set a priority or an order to execute the function.
I have a problem with $(window).resize(). I am attaching lots of functions loaded trough ajax and it's hard to calculate the sizes because is hard to predict when the functions are triggered.
Sorry for my bad english
Note: See
TracTickets for help on using
tickets.
We've discussed and rejected this feature several times before. There isn't any way to guarantee the execution order when multiple independent actors are involved and they bind/unbind events. You can say "I want to run first" but then someone comes along later and says "*I* want to run first."
If you control all the code and know you need a particular order, bind a single handler to the resize event and execute the handlers in the order you require.