Bug Tracker

Modify

Ticket #7548 (closed feature: duplicate)

Opened 3 years ago

Last modified 3 months ago

trigger order

Reported by: szabobogdan@… Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

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

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

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.

comment:2 Changed 3 years ago by dmethvin

Duplicate of #3781.

comment:3 Changed 3 months ago by timmywil

#13619 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.