jquery-yui3-rosetta-stone icon indicating copy to clipboard operation
jquery-yui3-rosetta-stone copied to clipboard

Include .live() and .delegate()?

Open stevenbedrick opened this issue 13 years ago • 3 comments

It seems like it would be handy to include an example of going between JQuery's .live() and YUI3's node-event-delegate. I'd do it myself, but don't feel like I understand either one well enough to give a definitive example.

stevenbedrick avatar May 12 '11 18:05 stevenbedrick

jQuery's $('#foo').delegate() seems like the closest match for YUI's Y.one('#foo').delegate().

I think $('.foo').live() would be more like doing event delegation from the document in YUI, but I'm not sure whether jQuery does other stuff under the hood.

I'd be happy to write the YUI side if someone who knows more about jQuery wants to write the jQuery side.

rgrove avatar May 12 '11 20:05 rgrove

@danbeam was actually talking about submitting a patch for this yesterday. Dan, step up to the plate, dawg.

derek avatar May 12 '11 20:05 derek

Today I learned that when you nominate someone else to take a bug in a F/OSS project, you instead are nominating yourself. Fair enough. :)

I'll patch with some examples of jQuery's live(), bind(), and delgate() vs YUI. When jQuery 1.3 got live(), I shit a brick because it was so magical.

derek avatar May 12 '11 22:05 derek