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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:57:21+00:00 2026-05-28T15:57:21+00:00

On this line I’m trying to select <tr> ‘s that contain either one of

  • 0

On this line I’m trying to select <tr>‘s that contain either one of these words but doesn’t contain an image but it’s not working, basically when I use it on the page, the page is blank.

$('#SubscribersManageList tr:contains("CIUDAD EVITA"), tr:contains("MORENO"), tr:contains("CORRIENTES"), tr:contains("LA MATANZA"), tr:contains("QUILMES"), tr:contains("LOMAS DE ZAMORA"), tr:contains("LANUS"), tr:contains("AVELLANEDA"), tr:contains("CORDOBA"), tr:contains("CAPITAL FEDERAL"), tr:contains("RAMOS MEJIA"):not(:has(img[src*="images/plus.gif"]))').css("background-color", "red").insertAfter("tr.Heading3:last");

How to do it, perhaps in a simplier way, if the line contains either one of the following words?

You can test here: http://jsfiddle.net/cwar3/1/

  • 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-28T15:57:22+00:00Added an answer on May 28, 2026 at 3:57 pm

    You either have to have the #SubscribersManageList with every comma piece separately or you can do like I did below and pass it just once as the context. I would probably write it like this (broken up onto multiple lines only for readability here – you have to put it back on one line to use it):

    $('tr:contains("CIUDAD EVITA"), 
       tr:contains("MORENO"), 
       tr:contains("CORRIENTES"), 
       tr:contains("LA MATANZA"), 
       tr:contains("QUILMES"), 
       tr:contains("LOMAS DE ZAMORA"), 
       tr:contains("LANUS"), 
       tr:contains("AVELLANEDA"), 
       tr:contains("CORDOBA"), 
       tr:contains("CAPITAL FEDERAL"), 
       tr:contains("RAMOS MEJIA")', $("#SubscribersManageList"))
           .not('img[src*="images/plus.gif"]')
           .css("background-color", "red")
           .insertAfter("tr.Heading3:last");
    

    Per your comments, if you want to insert them back into the DOM in a specific order, I’d suggest this:

    var containValues = [
       "CIUDAD EVITA",
       "MORENO", 
       "CORRIENTES", 
       "LA MATANZA", 
       "QUILMES", 
       "LOMAS DE ZAMORA", 
       "LANUS", 
       "AVELLANEDA", 
       "CORDOBA", 
       "CAPITAL FEDERAL", 
       "RAMOS MEJIA" 
    ];
    
    var context = $("#SubscribersManageList");
    var target = context.find("tr.Heading3:last");
    for (var i = containValues.length - 1; i >= 0; i--) {
        context.find('tr:contains("' + containValues[i] + '")')
            .not('img[src*="images/plus.gif"]')
            .css("background-color", "red")
            .insertAfter(target);
    }
    

    You can see it work here: http://jsfiddle.net/jfriend00/MzgbV/.

    This will go through the array one at a time, finding, styling and then inserting each one and will process them in the array order. It actually goes through the array backwards so the last one inserted ends up first.

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

Sidebar

Related Questions

This line doesn't make much sense, but I wonder why it raises a syntax
This line of code ((Matches)Container.DataItem).MatchID works in C# but in VB.NET, when used in
Got this line of code here but its not working. private void Button_Click(object sender,
This line of code is working fine for Firefox $(#<%=txt1.ClientID%>).text() but not for IE8
This line works and returns the value that I'm looking for: logs = Log.objects.filter(filterURI=aFilter.uri).values()[0]['yk']
This line works correctly in a small test program, but in the program for
This line will not work but I think I have used correct xpath? driver.findElement(By.xpath(//a[contains(@class,'cke_button_bold')])).click();
This line: $quey1=select * from clients WHERE USER == $current_user->user_login;; It returns an unknown
This line works fine <%=link_to_function name, $('#thing_name').html('<p>name<p>') %> This line doesn't <%=link_to_function name, $('#thing_name').html('<%=
This line works: sed -r -e 's/^([^#a-z]+)localhost/\1hostname.domain hostname localhost/' /etc/hosts But adding the itty

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.