I have a facebook like feeds application. I would like to execute timeago plugin for each of the feed that gets added dynamically.
$("abbr.timeago").timeago()
How do I call jQuery delegate to execute timeago() for each of the feed/new feed added dynamically?
i.e, What would be the event type on delegate method? or how to delegate with out event type?
Thanks in advance.
.delegate()works for events only. If your plugin has a custom event (which is possible) you can delegate to that. If not, you can try extending it yourself to have such an event.EDIT: I misunderstood your question. You can indeed fire a custom event, and delegate to that:
See the last example seen on http://api.jquery.com/delegate/