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

Ask A Question

Stats

  • Questions 530k
  • Answers 530k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Creating a timer is not that expensive, but it's still… May 16, 2026 at 11:34 pm
  • Editorial Team
    Editorial Team added an answer Use HTML::SimpleLinkExtor, HTML::LinkExtor, or one of the other link extracting… May 16, 2026 at 11:34 pm
  • Editorial Team
    Editorial Team added an answer Because you're using NUnit you'll want to use NUnits reporting… May 16, 2026 at 11:34 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Is there a jQuery equivalent to this prototype code? Ajax.Responders.register({ onException: function(x,y) { if(y.message!=Syntax
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() ?
In my AIR application, I want to animate an HTML element using jQuery. When
I've often wondered about the use of selectors versus equivalent functions in jQuery. By
Is there a jquery plugin for double clicking anywhere in a nuetral area to
Is there any Jquery Plugin to perform the image dimension operation on an image
Is there a jQuery technique to select all the page controls/divs with a non-zero
I've created a very basic slider with jQuery. There are two arrows called .theleft
I am migrating my js lib from prototype to jquery. However, I don't know

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.