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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:09:47+00:00 2026-05-25T02:09:47+00:00

I have this elements on my site which are added dynamically on jQuery’s document.ready

  • 0

I have this elements on my site which are added dynamically on jQuery’s document.ready function.

The problem is that I can’t select those element using regular jQuery selectors. The JavaScript runs fine in IE9 and other browsers. I think the reason why it does not work is because the content that I’m trying to alter is added dynamically.

How do I solve this issue?

Code:

$('.dynamic').each(function(index)
    {
        $('textarea, input[type=radio], input[type=checkbox], select, input[type=text]', this).each(function()
        {

            var array = $(this).val().split('|||');

            var elements = new Array();

            var target = String('.dynamic_'+$(this).attr('id'));        

            $(target).each(function() //this does nothing in ie7 and 8, seems the target selector is messed up :S
            {
                elements.push($(this)); 
            });

            for (val in array)
            {
                var count = Number(val);    
                $(elements[count]).val(array[val]);         
            }
        });
    });
  • 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-25T02:09:48+00:00Added an answer on May 25, 2026 at 2:09 am

    I don’t see any specific reason for targeting a javascript to IE7 or
    IE8 since we are all talking about jQuery here. I believe the real
    problem is not related to the browser itself, it’s the misuse of event
    bindings.

    You have to use the live() or delegate() method. They both will assign the event to the already existing elements in DOM and to the elements created dynamically.

    Ex:

    $(".element").live("click", function() {  
        //dazzling stuff here
    });
    

    And with delegate:

    $('.element').delegate('.context-element', 'click', function() {  
        //dazzling stuff here 
    });
    

    I suggest you to use deletage() instead of live() since I already experienced many bugs related to event bubbling in some browsers while using live. Also delegate() is much faster too, so if you’re working on a very intense application in terms of DOM manipulation, better to use it.

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

Sidebar

Related Questions

I have this jQuery plugin called Easy Slider which I'm implementing on this site
I have an XML file that starts like this: <Elements name=Entities xmlns=XS-GenerationToolElements> I'll have
I have this code in jQuery, that I want to reimplement with the prototype
I have an ASP.NET web site which contains some ImageButton controls that cause postbacks
I have some script, written in Javascript, that show progress of loading site elements.
I have a problem with two sides of my site, this is the link
I have a site, which has a jQuery based slider Awkward Showcase . In
Closed as exact duplicate of this question . I have an array/list of elements.
I have this in some WSDL: <element name="startDate" type="xsd:dateTime"/> <element name="endDate" type="xsd:dateTime"/> Which results
I have a div element that has an id and this div contains a

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.