Google Groups Home
Help | Sign in
Message from discussion New event: elementReady
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Bennett McElwee  
View profile
 More options Jul 30 2007, 8:52 pm
From: Bennett McElwee <bennettmcel...@gmail.com>
Date: Tue, 31 Jul 2007 00:52:30 -0000
Local: Mon, Jul 30 2007 8:52 pm
Subject: New event: elementReady
jQuery currently does not give the ability to run a function when a
specific element is loaded into the DOM. Other libraries have this
ability and it would be a useful addition. It's not in the 1.2 roadmap
or in any plugin that I have found, so I was wondering if it has been
considered.

This feature would be similar to jQuery.ready() except that it would
apply to a specific element instead of the whole document. I imagine
the declaration would be something like
    jQuery.elementReady(id, fn)
which would call the given function as soon as an element with the
given ID is available in the DOM.

The Yahoo UI library has two variants of this (onAvailable and
onContentReady), which work by polling. (See
http://developer.yahoo.com/yui/docs/YAHOO.util.Event.html) I think
other libraries also include this function. I'm sure it could be added
to jQuery, though code size is always the concern.

Has anyone thought about this, or even worked on it?

Cheerio,
Bennett.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google