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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:57:49+00:00 2026-06-17T19:57:49+00:00

I want to add a table to my website with jquery´s append function when

  • 0

I want to add a table to my website with jquery´s append function when the user hovers over the image $(“#dot0003”). Dreamweaver already tells me that there is a syntax error but I don’t understand where.

$(document).ready(function() {

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

        $("#tablespace").append('

        <table  id="table1" class="info0004" border="4">
        <tr>
        <td>roomnumber</td>
        <td>200</td>
        </tr>
        <tr>
        <td>number of bathrooms</td>
        <td>2</td>
        </tr>
        <tr>
        <td>number of beds</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-17T19:57:50+00:00Added an answer on June 17, 2026 at 7:57 pm

    Are you sure this is what you’re trying to do? Meaning, when you hover over dot0003, it’s going to keep trying to append this data. See the fiddle here.

    With that said, your issue is with your spaces. See the fiddle above. Either remove your spaces or build your string like:

    var myContent = '<table  id="table1" class="info0004" border="4">'
    myContent += '<tr>'
    ...
    

    But this produces invalid HTML markup as your adding tables in your table like such:

    <table>
        <tr><td></td></tr>
        <table>
        ...
    

    I think you should use jQuery’s after method instead of append.

    Good luck.

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

Sidebar

Related Questions

Hi I want to add image in table cell according to condition in table.
I have a composite and want to add a table to it. So far
I want to add linearlayout in table row and that linear layout will hold
I developed small CakePHP application, and now I want to add one more table
I want to add Excel button below the html table, that gives an Excel
I want to add 100 entry to users table numbers field, random characters length
I want to add expire TIMESTAMP in DB table. I have one field timestamp
I want to add a variable number of records in a table (days) And
Question: I want to add a unique constraint on a mapping table (n:n). I
I have a table in my markup on which I want to add some

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.