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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:22:21+00:00 2026-06-10T07:22:21+00:00

This is the workflow: Add elements dynamically to a div container Register click event

  • 0

This is the workflow:

  1. Add elements dynamically to a div container
  2. Register click event for this elements (using jquery custom function)
  3. Trigger the element event

According to the flow above, I can’t get the new element event works, because it never is triggered. This is my scenario:

http://jsfiddle.net/9Ru76/1/

The idea is that when you click over “element” its ID attribute should be printed in .log div

Edit:

I have tested all answers and all of them work fine 🙂

  • 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-10T07:22:23+00:00Added an answer on June 10, 2026 at 7:22 am

    In jsFiddle, the code is automatically put in a $(document).ready block. So, what’s happening is your $(document).ready is ran immediately. This means it’s ran before jQuery.fn.showID is set.

    Also, $(".element").showID();​ binds the event to .elements that exist at that time. New elements won’t have the event bound. You need to either use event delegation (which makes the showID plugin useless), or call showID after adding the element (making sure not to re-bind to old elements).

    P.S. Inside a jQuery plugin this is already a jQuery object, no need to use $(this).

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

Sidebar

Related Questions

I am kicking around the idea of using a workflow engine on this upcoming
i have this piece of function..and i want to add a new line to
I need to add a custom activity to the default workflow template to increase
I have created a workflow, and Im running it via WorkflowInstance.Run(). This workflow has
This issues comes up when executing a particular workflow - User is logged in
The workflow requested by customer is something like this : The user on registration
The workflow for my Django project should go like this: User specifies parameters for
I've a workflow that use a Business layer (in a separated dll) This Business
We are customizing workflow approval form to display the associated list item fields. This
I've got a process something like a workflow, assume it like this: Prepare Eat

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.