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 8361239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:39:15+00:00 2026-06-09T11:39:15+00:00

Im trying to run a function on an element ( .this_button ) that is

  • 0

Im trying to run a function on an element (.this_button) that is being loaded dynamically. Im using the following code:

$(function(){
    $("body").on("load", ".this_button", function() {
         console.log("its been loaded");
    });
});

I tried delegate, but it says its been deprecated in favor of on. Some elements might be pushed, say after the document’s been loaded for 10 minutes already. How can it continually check if an element .this_button has entered the body?

Anyone know why this isnt working?

  • 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-06-09T11:39:17+00:00Added an answer on June 9, 2026 at 11:39 am

    From the documentation:

    “In all browsers, the load, scroll, and error events (e.g., on an element) do not bubble. […] Such events are not supported for use with delegation, but they can be used when the event handler is directly attached to the element generating the event.”

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

Sidebar

Related Questions

I'm trying to run a function on an object that is loaded into the
I'm trying to run a function that is located within a .ps1 file. The
I'm trying to run the code from here MDN: Generators and Iterators function fib()
I'm trying to run a function called makeHighlight within my constructor SmartButton. makeHighlight is
I am trying to run a function of the main class, but even with
I'm trying to run the Count() function of a Linq statement in an overriden
I am trying to run a map/reduce function in mongodb where I group by
I was developing a small function when trying to run an enumerator across a
I am trying to get my Chrome Extension to run the function init() whenever
I am trying to create a function to run when a select option is

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.