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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:28:45+00:00 2026-06-13T19:28:45+00:00

So, basically I have a plugin that I want called on an element if

  • 0

So, basically I have a plugin that I want called on an element if it is created in the dom,

E.g. let’s say I have a plugin called domWatch that runs the function if the specified selector gets created inside the selector it was called on.

so:

$('#container').domWatch('.mySelector', function(element){
    $(element).myPlugin();
});

$('#container').append($('<div />', {class: 'mySelector'})); //the new element should now have the myPlugin plugin called on it.

Is this possible to do?

  • 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-13T19:28:47+00:00Added an answer on June 13, 2026 at 7:28 pm

    Have a look at this clever hack: http://www.backalleycoder.com/2012/04/25/i-want-a-damnodeinserted/. It uses CSS3 animations to detect when an element was inserted into the DOM.

    The problem with ‘listening for when a DOM element is created’ is the performance hit, so maybe you should consider a different approach to solve your problem.

    I’m sure there are many, way simpler ways to achieve your goal.

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

Sidebar

Related Questions

I have written a jQuery plugin called waitForImages . It basically gives the ability
I have a problem with jquery plugin called quikflip. Basically, the plugin flips an
I have a jcycle plugin on a number of divs which are testimonials. Basically
I basically have a program that filters records from one excel file to another
I basically have 7 select statements that I need to have the results output
I have a Service that downloads a file from the internet. What I want
I have a custom plugin, with a constructor like this: (function($){ $.fn.extend({ myplugin: function(options)
I have a jquery plugin that is working on all browsers, except opera. The
I want to create a preview function for posts that allows people to view
I am looking to have a UI element similar to that offered by the

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.