Custom event in jQuery that isn't bound to a DOM element?

前端 未结 7 1054
迷失自我
迷失自我 2020-12-12 20:28

I\'m curious if its possible to create a custom event in jQuery that isn\'t bound to a DOM element.

I greatly prefer jQuery to YUI but there is one thing in YUI that

7条回答
  •  我在风中等你
    2020-12-12 21:01

    jQuery Callbacks provides a simple way to implement a pub-sub system independent of the DOM.

    Near the bottom of the linked page is example code that shows how to do that.

提交回复
热议问题