开发者

does javascript/jquery have an event model that you can create?

开发者 https://www.devze.com 2022-12-22 21:23 出处:网络
Does jquery/javascript have any event model that you can attach to your objects? Basically I want an object to have an event, and I want other objects to be able开发者_Python百科 to subscribe to thes

Does jquery/javascript have any event model that you can attach to your objects?

Basically I want an object to have an event, and I want other objects to be able开发者_Python百科 to subscribe to these events?


Take a look at these:

Custom events in jQuery? Custom jQuery event

and here:

http://www.reynoldsftw.com/2009/04/custom-events-in-jquery-open-doors-to-complex-behaviors/


You can use the bind function for custom events.

0

精彩评论

暂无评论...
验证码 换一张
取 消