does javascript/jquery have an event model that you can create?
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.
精彩评论