Firstly, the third function ( .delegate ) was replaced with .on (jQuery 1.7 onwards), so I would not use this.
The second method will start the complex selector ".dropdown-menu.show_opt_menu", which is (relatively) expensive since it first gets all .show_opt_menu and then looks at which parents have .dropdown-menu . Then it binds one event for each element. This is (relatively) expensive since you use a slow query and then bind potentially many events.
The first method is the best, since it binds only one event to the .dropdown-menu , then whenever the click event reaches it, it checks the event to see what the original target was. This is a much cheaper option, and since only one event is associated with it is much more effective.
Summary: # 1 is the best, # 2 is usually done, but worse, # 3 is deprecated.
You probably wonβt notice the difference in performance, but in any case, you should pay attention to the fact that this is good practice. At some point, you may have to worry about performance.
source share