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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:02:39+00:00 2026-06-13T21:02:39+00:00

Once again I’m hoping your joint expertise will help find an elegant solution. I’m

  • 0

Once again I’m hoping your joint expertise will help find an elegant solution. I’m automating a report to minimize human input (and error). The base of the report is a webpage, which has the following code:

</p></li>

 <li>ARTICLE 1<br />
    <p>    
       <div class="list">
           Nothing found. 
       </div>
    </p>
 </li>
 <li>
    <p>ARTICLE 2</p>    
    <div class="list">
    <h4 class="sub-heading">ITEMS</h4>
     <ul>
        <li class="item">
           <span class="title"> 

The p elements are created by me, while the div class=”list” are outputs of a plugin beyond my reach. Basically the plugin scans the databases with certain query, and produces either a list of items found for given query or a “Nothing found” string. The operators then copypaste it to somewhere and remove the “ITEMS” header and “Nothing found.” to make the report more readable.
What I managed to do so far is using these jqueries:

$(".list .sub-heading").addClass("hidden");
$(".list:contains('Nothing found.')").addClass("hidden");

What I would like to achieve is add a jquery, that removes not only the divs containing “Nothing found.”, but also the preceeding element, which is the line containing “ARTICLE 1” in the above example.
Please assist if you could produce a reasonable solution. Thanks in advance.

  • 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-13T21:02:40+00:00Added an answer on June 13, 2026 at 9:02 pm

    You can you closest method and hide the li element which hides all of it’s content:

    $(".list:contains('Nothing found.')").closest('li').addClass("hidden");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Once again I need your Help, am thanking you as every time you helped
Once again I have a problem which I can't find the solution to. A
once again, i need your help to my kernel module. I have implemented an
Once again I'm asking this question, and still can't find any reasonable solution. I
once again was hoping you could help me out. I am a novice at
Once again I can't find a neat solution for a simple UI problem in
I need your expertise once again. I have a java class that searches a
Once again I find myself failing at some really simple task in C++. Sometimes
Once again, I need some help and I appreciate you all for being here
I am once again looking for some help. I have found this stopwords script

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.