I m 试图在网站和古角展期之间实行公共/次级模式。 迄今为止,我的大多数实验都一直在使用 j,因为它是强力的、有约束的辛迪加,但我是没有多少uck。
Background: I m working with an open source, Ruby/Rails-based Pomodoro Technique implementation. I ve modified the site s code to expose its activity using jQuery s $.trigger syntax to publish observable events for the start of a timer session and the end of a timer session. Those triggers work in so far as I can trace the execution into the jQuery event code. So the site is the publisher of a couple of relevant events.
我通过装满舱,并利用bin(Bbind) syntax对由该网址出版的习俗活动进行约束,在 go角展期完成交易。 该展期将装上该站点,并允许该场址的所有航道。
From the publication side I ve tried both $.event.trigger() and $(document).trigger() to be as general as possible, on the subscriber side I ve tried binding to several relevant elements, the most general being $(document).bind()
When I observe the custom event binding by pausing execution after the bind calls in the extension are executed and analyze the results of console.dir($(document).data( events )); I see the custom events I m trying to subscribe to in the list.
然而,当我收到一份书面文件时,数据(事件);在启动“定制”之前,即“必要”——即:在清单中。
我在如何开展工作时,忽略了一些明显的东西?
p.s. I should note that if I bind directly to the click event on the elements that trigger the changes my extension code work perfectly, but the DOM of the site changes during execution so the bindings break after not too long so I was hoping that some sort of pub-sub mechanism might be more sensible.
http://www.ohchr.org。
正如我在对“ChrisNZL”的答复中指出的那样,我尝试了......live()而不是.bind(),并且看到了同样的行为。