Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1064011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:52:02+00:00 2026-05-16T18:52:02+00:00

Is there a jQuery equivalent to do the following: $(document).ready(function() { for an element:

  • 0

Is there a jQuery equivalent to do the following:

$(document).ready(function() {

for an element:

$(a).ready(function() {

I have content in an updatepanel and I am calling jQuery UI’s .button() on some anchor elements. After the updatepanel refreshed, the anchors are rerendered and lose the UI styling.

I already know how to detect the end of an ajax request using .NET AJAX’s add_endrequest(handler), but was hoping for a neater solution using jQuery.delegate.

e.g.

$('body').delegate('#mybutton', 'load', (function(){  //this doesnt work... }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:52:03+00:00Added an answer on May 16, 2026 at 6:52 pm

    If I understand your requirement correctly, one way to do this is with the Live Query plug-in.

    Live Query … has the ability to fire
    a function (callback) when it matches
    a new element and another function
    (callback) for when an element is no
    longer matched

    For example:

    $('#someRegion a').livequery( function(){ 
      do_something();
    });
    

    Update: Since the DOM changes are not running through jQuery, unfortunately livequery doesn’t see them. I mulled over this issue before and considered a polling-based solution in this answer.


    Update: Polling is kind of ugly, but if there’s really no other alternative, here’s a polling-based solution that uses a jQuery “dummy” manipulation to make livequery “see” the change. You’d only want to consider something like this as a last resort — if there’s no option to tie into a callback method.

    First, set up livequery watching the container where the updates will occur:

    $('div#container').livequery( function(){ 
      $(this).css('color','red'); // do something
    });
    

    And then use setInterval(), here wrapped in a convenience function:

    function pollUpdate( $el, freq ){
      setInterval( function(){
        $el.toggleClass('dummy');
      }, freq); 
    };
    

    So you can have:

    $(document).ready( function(){
      pollUpdate( $('div#container'), 500 );
    });
    

    Here’s a working example. Click the button to add new DOM elements without jQuery, and you’ll see they get picked up (eventually) and restyled by livequery. Not pretty, but it does work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a jQuery equivalent to this prototype code? Ajax.Responders.register({ onException: function(x,y) { if(y.message!=Syntax
In jQuery, is there a function/plugin which I can use to match a given
I am trying to find an equivalent for the following jQuery javascript: var x1
Does the Prototype Javascript library have a selector that's equivalent to jQuery's :contains() ?
Is there a jQuery equivalent to prototype's defer? I'm looking for something that will
Is there an equivalent of ASP.NET's ModalPopup in jQuery UI?
There are a number of great Javascript libraries\frameworks out there (jQuery, Prototype, MooTools, etc.),
Are there any jQuery 1.3 animation-transitions that work in both Firefox 3 and IE7?
In previous versions of jQuery tabs there was an option to automatically set the
Is there a repository for JQuery UI themes?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.