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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:55:43+00:00 2026-06-18T08:55:43+00:00

I have a table and I want to find a specific row and move

  • 0

I have a table and I want to find a specific row and move it to the end. I do that with this code:

var failLegend = $(".jqplot-table-legend tbody tr").filter(function() {
    return $(this).text() == "GA Fails";
}).closest("tr");

failLegend.insertAfter($(".jqplot-table-legend tbody tr:last"));

That works fine as long as I have just one table. But I have multiple tables all with the same class, and I end up with all of the “GA Fails” rows from all the tables an the end of the last table (instead of one on each table). Each table is in its own div, and I can get at the div name from the $chart variable:

$chart
[
<div id=​"chart_0" style=​"width:​ 95%;​ height:​ 450px;​ position:​ relative;​ " class=​"jqplot-target">​…​</div>​

But I can’t figure out how to use that in my code so when I find and move the row, it only applies to the specific div in $chart.

Here is the full value of $chart:

$chart
[
<div id=​"chart_0" style=​"width:​ 95%;​ height:​ 450px;​ position:​ relative;​ " class=​"jqplot-target">​
<canvas width=​"1300" height=​"450" style=​"position:​ absolute;​ left:​ 0px;​ top:​ 0px;​ " class=​"jqplot-base-canvas">​
<div class=​"jqplot-title" style=​"height:​ 0px;​ width:​ 0px;​ ">​</div>​
<div class=​"jqplot-axis jqplot-xaxis" style=​"position:​ absolute;​ width:​ 1300px;​ height:​ 66px;​ left:​ 0px;​ bottom:​ 0px;​ ">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 22.5px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"66" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 49.77777777777778px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 77.05555555555556px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 104.33333333333333px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 131.61111111111111px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 158.88888888888889px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 186.16666666666666px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 213.44444444444446px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 240.72222222222223px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 268px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 295.27777777777777px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 322.55555555555554px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 349.8333333333333px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 377.1111111111111px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 404.3888888888889px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 431.6666666666667px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 458.94444444444446px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"66" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 486.22222222222223px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 513.5px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 540.7777777777778px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"66" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 568.0555555555555px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 595.3333333333334px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 622.6111111111111px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 649.8888888888889px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 677.1666666666666px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 704.4444444444445px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 731.7222222222222px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 759px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 786.2777777777778px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 813.5555555555555px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 840.8333333333334px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 868.1111111111111px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"66" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 895.3888888888889px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 922.6666666666666px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 949.9444444444445px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 977.2222222222222px;​ " class=​"jqplot-xaxis-tick">​
<canvas width=​"15" height=​"4" style=​"text-align:​ left;​ position:​ absolute;​ left:​ 1004.5px;​ " class=​"jqplot-xaxis-tick">​
</div>​
<div class=​"jqplot-axis jqplot-yaxis" style=​"position:​ absolute;​ height:​ 450px;​ width:​ 19px;​ left:​ 0px;​ top:​ 0px;​ ">​
<div class=​"jqplot-yaxis-tick" style=​"position:​ absolute;​ top:​ 366.5px;​ ">​-0.3​</div>​
<div class=​"jqplot-yaxis-tick" style=​"position:​ absolute;​ top:​ 306px;​ ">​-0.2​</div>​
<div class=​"jqplot-yaxis-tick" style=​"position:​ absolute;​ top:​ 245.5px;​ ">​-0.1​</div>​
<div class=​"jqplot-yaxis-tick" style=​"position:​ absolute;​ top:​ 185px;​ ">​-0.0​</div>​
<div class=​"jqplot-yaxis-tick" style=​"position:​ absolute;​ top:​ 124.5px;​ ">​0.1​</div>​
<div class=​"jqplot-yaxis-tick" style=​"position:​ absolute;​ top:​ 64px;​ ">​0.2​</div>​
<div class=​"jqplot-yaxis-tick" style=​"position:​ absolute;​ top:​ 3.5px;​ ">​0.3​</div>​
</div>​
<div class=​"jqplot-axis jqplot-y2axis" style=​"position:​ absolute;​ height:​ 450px;​ width:​ 11px;​ right:​ 257px;​ top:​ 0px;​ ">​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 366.5px;​ ">​0​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 330.2px;​ ">​1​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 293.9px;​ ">​2​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 257.6px;​ ">​3​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 221.3px;​ ">​4​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 185px;​ ">​5​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 148.7px;​ ">​6​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 112.4px;​ ">​7​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 76.10000000000002px;​ ">​8​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 39.80000000000001px;​ ">​9​</div>​
<div class=​"jqplot-y2axis-tick" style=​"position:​ absolute;​ top:​ 3.5px;​ ">​10​</div>​
</div>​
<canvas width=​"1300" height=​"450" class=​"jqplot-grid-canvas" style=​"position:​ absolute;​ left:​ 0px;​ top:​ 0px;​ ">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-shadowCanvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-shadowCanvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-shadowCanvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-shadowCanvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-canvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-canvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-canvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-series-canvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-highlight-canvas">​
<div class=​"jqplot-highlighter-tooltip" style=​"position:​ absolute;​ display:​ none;​ ">​</div>​
<div class=​"jqplot-cursor-tooltip" style=​"position:​ absolute;​ display:​ none;​ ">​</div>​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-zoom-canvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-lineRenderer-highlight-canvas">​
<canvas width=​"982" height=​"363" style=​"position:​ absolute;​ left:​ 30px;​ top:​ 10px;​ " class=​"jqplot-event-canvas">​
<table class=​"jqplot-table-legend" style=​"position:​ absolute;​ margin-top:​ 0px;​ z-index:​ 3;​ right:​ 0px;​ top:​ 10px;​ ">​
<tbody>​
<tr class=​"jqplot-table-legend">​
<td class=​"jqplot-table-legend jqplot-table-legend-swatch jqplot-seriesToggle" style=​"text-align:​ center;​ padding-top:​ 0px;​ ">​
<div class=​"jqplot-table-legend-swatch-outline">​
<div class=​"jqplot-table-legend-swatch" style=​"background-color:​ rgb(33, 56, 148)​;​ border-color:​ rgb(33, 56, 148)​;​ ">​</div>​
</div>​
</td>​
<td class=​"jqplot-table-legend jqplot-table-legend-label jqplot-seriesToggle" style=​"padding-top:​ 0px;​ ">​NOVA_NAV_500_10pt_MCD_VL​</td>​
</tr>​
<tr class=​"jqplot-table-legend">​
<td class=​"jqplot-table-legend jqplot-table-legend-swatch jqplot-seriesToggle" style=​"text-align:​ center;​ padding-top:​ 0.5em;​ ">​
<div class=​"jqplot-table-legend-swatch-outline">​
<div class=​"jqplot-table-legend-swatch" style=​"background-color:​ rgb(0, 0, 0)​;​ border-color:​ rgb(0, 0, 0)​;​ ">​</div>​
</div>​
</td>​
<td class=​"jqplot-table-legend jqplot-table-legend-label jqplot-seriesToggle" style=​"padding-top:​ 0.5em;​ ">​GA Fails​</td>​
</tr>​
<tr class=​"jqplot-table-legend">​
<td class=​"jqplot-table-legend jqplot-table-legend-swatch jqplot-seriesToggle" style=​"text-align:​ center;​ padding-top:​ 0.5em;​ ">​
<div class=​"jqplot-table-legend-swatch-outline">​
<div class=​"jqplot-table-legend-swatch" style=​"background-color:​ rgb(255, 154, 0)​;​ border-color:​ rgb(255, 154, 0)​;​ ">​</div>​
</div>​
</td>​
<td class=​"jqplot-table-legend jqplot-table-legend-label jqplot-seriesToggle" style=​"padding-top:​ 0.5em;​ ">​NOVA_NAV_500_10pt_MCD_VL_FS_test​</td>​
</tr>​
<tr class=​"jqplot-table-legend">​
<td class=​"jqplot-table-legend jqplot-table-legend-swatch jqplot-seriesToggle" style=​"text-align:​ center;​ padding-top:​ 0.5em;​ ">​
<div class=​"jqplot-table-legend-swatch-outline">​
<div class=​"jqplot-table-legend-swatch" style=​"background-color:​ rgb(255, 0, 0)​;​ border-color:​ rgb(255, 0, 0)​;​ ">​</div>​
</div>​
</td>​
<td class=​"jqplot-table-legend jqplot-table-legend-label jqplot-seriesToggle" style=​"padding-top:​ 0.5em;​ ">​NA Count​</td>​
</tr>​
</tbody>​
</table>​
</div>​
]
  • 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-18T08:55:44+00:00Added an answer on June 18, 2026 at 8:55 am

    I got an answer on http://forum.jquery.com/ that works perfectly:

    var rows = $('.jqplot-table-legend tbody tr', $chart);
    rows.filter(function() {
          return $(this).text() == 'GA Fails';
    }).closest('tr').insertAfter(rows.last());
    

    Thanks everyone for trying to help.

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

Sidebar

Related Questions

I have some code that grabs some rows from a table and I want
I have a table like: id number year I want to find holes, or
I have a table Transactions(store_id, item_id, price). I want to find store_id's which sell
I have the following table in my database. Now what I want to find
How do I split a table: I have a table that i want to
This code is used to get a specific list of ID's from one table,
I have table Animal. I want to return everything from this table + one
I have 4x4 table of letters and I want to find all possible paths
I have around 100 entries in MySql table, that contain a specific word in
I have a class and subclasses who extends that. Like this: @Table @Entity class

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.