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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:22:55+00:00 2026-05-18T21:22:55+00:00

I am very new to object orientated javascript, with experience writing gui’s in python

  • 0

I am very new to object orientated javascript, with experience writing gui’s in python and java. I am trying to create html tables that I can place in locations throughout a webpage. Each html table would have two css layouts that control if it is selected or not. I can write all of the interaction if I only have one table. It gets confusing when I have multiple tables. I am wondering how to place these tables throughout a blank webpage and then access the tables individually. I think I am having trouble understanding how inheritance and hierarchy works in javascript/html.

NOTE: I am not asking how to make a table. I am trying to dynamically create multiple tables and place them throughout a webpage. Then access their css independently and change it (move them to different locations or change the way the look, independently of the other tables).

  • 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-18T21:22:56+00:00Added an answer on May 18, 2026 at 9:22 pm

    Assuming you want to make changes in real-time and you’re willing to use a library like jQuery, simply append the table(s) to the document and give each one a unique CSS id. Wherever your table generation code is taking place, just keep a counter and set the id to something like “mytable+counter_val”.

    From there you can reference each table and use jQuery methods to adjust the CSS to your liking.

    A brief example:

    var container_id = "#the_parent";
    
    for (var i = 0; i < 10; ++i) {
     var table_id = "mytable_" + i;
     var table_code = "<table id=" + table_id + "></table>";
     $(container_id).append(table_code);
    }
    
    // set border on table 7 (indexing at 0)
    $("#mytable_6").css("border", "5px solid red");
    
    // move table 5 (indexing at 0)
    $("#mytable_4").css("top", "300px");
    
    // animate table 2 (indexing at 0)
    $("#mytable_1").animate({left : 300, top: 125}, 2000);
    

    If you have the difference between selected and unselected separated into a single class, you can just add/remove that class:

    // table 2 is now displayed as being selected
    $("#mytable_1").addClass("selected");
    
    // table 2 is now displayed as being unselected
    $("#mytable_1").removeClass("selected");
    

    See the jQuery docs for more information: http://docs.jquery.com/Main_Page

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

Sidebar

Related Questions

I am very new to JavaScript. Kindly note that I am trying below issue
I'm VERY new to WPF, and still trying to wrap my head around binding
I'm still very new to Object Oriented programming and am having problems with the
I am very new to Dynamics. I'm trying to figure out if I can
I am very new to JS and am trying to modify the JavascriptKit jQuery-based
I'm very new to Python, sort of following Dive into Python 2 and wanted
I'm a little new to object oriented programming, and very new to Qt and
Im very new to SQL but need to write a query to do the
Warning - I am very new to NHibernate. I know this question seems simple
I still very new using Subversion. Is it possible to have a working copy

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.