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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:30:42+00:00 2026-05-20T07:30:42+00:00

I have a table on my site that contains the options for different products.

  • 0

I have a table on my site that contains the options for different products. I didn’t put it there, the ecommerce platform did. It lists the options in a row in the table. The table looks like this:

<div class="attributes">
    <table>
        <tbody>
            <tr>
                <td>Size:</td>
                <td>&nbsp;</td>
                <td><select><option>Sizes here</option></select></td>
            </tr>
        </tbody>
    </table>
</div>

Then if there were another option it would be in an additional row with the same markup.

This renders with the label (size in this case) out in front of the <select> box. I want the label above the <select> box and I figured the easiest way to accomplish this would be to close the <tr> and open a new one. Any ideas on how to do this?

EDIT: I should mention that the ecommerce platform generates the html and I do not have access to the source code

  • 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-20T07:30:43+00:00Added an answer on May 20, 2026 at 7:30 am

    Assuming that it follows that exact structure, try this:

    $(".attributes select").each(function(){
        $label = $(this).parent().prev().prev();
        $label.parent().before("<tr></tr>");
        $label.parent().prev().append($label.clone());
        $label.remove();
        $(this).parent().prev().remove();
    });
    

    Here’s an example: Demo

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

Sidebar

Related Questions

I have a .NET 3.5 web site with a table tag that contains col,
I have a site with multiple pages, and each page has a table that
I have a table row with 4 columns on my ecommerce site and I
I have been trying to parse the bottom table on this site using different
I have a table that contains a keyword_id, site_id, percentage. Now I use: SELECT
I have a asp.net web site that contains some tables. However these are not
I have table with a column that contains multiple values separated by comma (,)
I have a large database that contains many urls, there are many domains repeating
This is for MySQL and PHP I have a table that contains the following
I have table where I track various statistics about site usage. Once a week,

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.