And if you already have one or more p tags on the page already and
just adding more you could use the Copy Events plugin (in SVN) to just
copy events from an existing p tag to the new p tags.

$(newPTags).copyEvents(existingPTag);

BTW Mike, great plugin!

--
Brandon Aaron

On 2/8/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
> >  Is there a way to reapply handlers after executing a Taconite request? For
> > example, there may be click handlers that are applied to all the <p>
> > elements on a page. When you make XML request and Taconite does it's magic,
> > how would you reapply those click handlers to the loaded content?
>
> Hi David,
>
> You can reapply handlers the same way you do for any other ajax
> request.  Just use a success callback.  For example:
>
> $.get('myUrl', function() {
>    // reapply handlers here
> });
>
> If you're not sure what parts of the page have been updated you could
> filter out elements that already have a click handler like this:
>
> $.get('myUrl', function() {
>     $('p').each(function() {
>         if (this.onclick) return;
>         $(this).click(myClickHandler);
>     });
> });
>
> Mike
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to