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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:17:43+00:00 2026-06-17T20:17:43+00:00

I am using .after to add a table to my website but I need

  • 0

I am using .after to add a table to my website but I need values from a variable to be inserted in the cell. It seems like I cannot access them. Possibly I am taking a completely wrong approach.

var object0001= {price: 1000, bedrooms:2}

$(document).ready(function() {

    $("#dot0003").hover(
        function(){

            $("#tablespace").after(
            '<table  border="4">'+
            '<tr><td>price</td>'                '<td>object0001.price</td></tr>'+
            '<tr><td>number of bedrooms</td>'   '<td>object0001.bedrooms</td></tr>'+
            '<tr><td>livingroom</td>'           '<td><img src="_index/_dots/dot.gif" width="20" height="20"></td></tr></table>')        

    });


    });

Any help appreciated!

  • 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-17T20:17:44+00:00Added an answer on June 17, 2026 at 8:17 pm

    It should be like this

    var object0001= {price: 1000, bedrooms:2};
    
    $(document).ready(function() {
      $("#dot0003").hover(function(){
        $("#tablespace").after(
          '<table  border="4">'+
          '<tr><td>price</td><td>'+object0001.price+'</td></tr>'+
          '<tr><td>number of bedrooms</td><td>'+object0001.bedrooms+'</td></tr>'+
          '<tr><td>livingroom</td><td><img src="_index/_dots/dot.gif" width="20" height="20"></td></tr></table>')        
      });
    });
    

    whatever is between the ” is a string , and not to be parsed as JavaScript

    try to make all of the html in a variable , then pass it to append , it will save you time when you try to maintain the code

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

Sidebar

Related Questions

I am trying to add a table row to a table using .after() but
I tried to add dot after a table, by using table::after selector to create
Am using the following notation to add a primary key to a table: ALTER
I'm using CSS :before and :after to add dotted line visual elements to a
I'm using 3 views in my calendar: month, agendaWeek, and agendaDay. After I add
I'm trying to add my_custom_function after the_content in WordPress using add_filter ('the_content', 'my_custom_function'); add_action
I want to add new feature to the search in my website. I'm using
In my web application, I was dynamically adding/deleting rows from my HTML table using
I need to add a column to my current table. This table is used
I want to add unique hit counter to my website using PHP. So this

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.