开发者

jquery - capture event when it's handled by existing plugin

I'm using a jQuery UI plugin that captures mouse/keyboard clicks (ui.selectable.js) and doesn't seem to propagate it further.

Is there some开发者_JS百科 trick I can use to capture keydown or mouse* events in my code even for elements where the plugin is already listening for these events and not propagating them?


maybe the live() method is what you are searching for to capture the specified events e.g. "mouseover" or "keydown" if they are already captured by your plugin.

Note that you'll have to use jQuery 1.4 to bind more than one live event of the same type to an object - if I remember the release notes correctly ;)

btw: you are able to stop the plugin for specific objects by using die() or unbind()


I think you ought to see this podcast, its not very long but it will make you understand event delegation in jquery :

http://james.padolsey.com/javascript/screencast-1-event-delegation-in-jquery/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜