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

The Archive Base Latest Questions

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

Most of my html is data that is provided via a Jquery request. It

  • 0

Most of my html is data that is provided via a Jquery request. It is written to the page by inserting it into a “main” div like such:

$("#main").html(passedData);
}

The page works great, but now i’m having problems trying to add any javascript to that data that is written to the div.

Namely I have tables that are inserted into the div and I am trying to write scripts that hide certain cells when others are clicked. I’ve used http://jsfiddle.net/ to make sure that all of my JS is correct, but for some reason it seems like the JS functions don’t see that data in the div and won’t manipulate it.

Is there anything I’m missing? When writing data to a page like this do you have to do certain things to reference that data with javascript?

  • 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-09T19:38:40+00:00Added an answer on June 9, 2026 at 7:38 pm

    You have to attach event handlers to those “future” elements like this:

    $("#main").on("click", ".myelement", function(){
            // Do something
    });
    

    Read more here. Also, it would be a lot easier if you posted your actual code.

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

Sidebar

Related Questions

I need to extract data from HTML-files. The files in question are, most likely,
If I have the following HTML: <div id=container> <iframe></iframe> </div> What is the most
Hmmmm ... Although it works in most cases, one column has html data in
I'm building a custom page caching utility that uses a syntax like {Substitution:GetNonCachedData} to
I have used both, and I conclude that I can read html data from
In a page that has a grid/list dynamically loaded via AJAX, an efficient way
I have a series of items being inserted into my html document via ajax
I've got a source of data that has HTML tags in it (B, I,
I'm desperately looking for a Java HTML view engine that fulfills three main requirements:
I'm finding myself hardcoding html into C#. It's usually on a data-driven pages. 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.