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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:54:08+00:00 2026-05-26T00:54:08+00:00

I have this HTML piece of code and I want to display:none on the

  • 0

I have this HTML piece of code and I want to display:none on the class ss_label of which it has value From:, To:, Departing: and Returning:. The last 3 that has an extra class of ss_label_adult, ss_label_child and ss_label_inf, I want them to be displayed correctly.

The HTML is retrieved from an API so I can’t change the way it is.

<table cellspacing='0' class='ss_sp_as'>
<tbody>
<tr class='ss_sp_sc_from'>
    <td class='ss_label'>
        From:
    </td>
    <tr class='ss_sp_sc_to'>
        <td class='ss_label'>
            To:
        </td>
        </table>
        <table cellspacing='0' class='ss_sp_dates'>
        <tbody>
        <tr class='ss_sp_sc_to'>
            <td class='ss_label'>
                Departing:&nbsp;
            </td>
            <tr class='ss_sp_sc_to'>
                <td class='ss_label'>
                    Returning:&nbsp;
                </td>
                </table>
                <table cellspacing='0' class='ss_sp_pass'>
                <tbody>
                <tr class='ss_sp_sc_to'>
                    <td class="ss_label ss_label_adult">
                        &nbsp;
                    </td>
                    <td class="ss_label ss_label_child">
                        &nbsp;
                    </td>
                    <td class="ss_label ss_label_inf">
                        &nbsp;
                    </td>
                    </table>

The only way I could think of doing this, is by display:none dynamically to the ones that haven’t got more classes? Does that makes sense?

Thanks alot

  • 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-26T00:54:09+00:00Added an answer on May 26, 2026 at 12:54 am

    These elements that should be hidden have multiple class names, where the elements which have to be hidden have only one class name. So, this expression should work:

    $(".ss_label").filter(function(){
         return $(this).attr("class") == "ss_label";
    }).css("display","none");
    
    1. All .ss_label elements are selected
    2. All elements whose class attribute contains no more than ss_label are kept, the others are ignored.
    3. The remaining elements are assigned a display property which value none.

    Fiddle: http://jsfiddle.net/QGSsG/

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

Sidebar

Related Questions

I have this piece of HTML code: <tr class=AttCardFooter onMouseOver=this.style.backgroundColor='#E1EAFE' onMouseOut=this.style.backgroundColor='Transparent'>...etc etc.. new lines
I have this piece of code: <li class=selected><a href=/AmIACandidate.html>Am I a Candidate?</a></li> I need
I have this piece of html code. I want to get the text inside
I have this simple piece of HTML code: <div> <input type=file name=english-file /> </div>
I have this simple html piece of code, whenever I click on any of
I have this piece of HTML: <div class=embed> <iframe width=300 height=200 frameborder=0 allowfullscreen= src=http://www.youtube.com/embed/123456></iframe>
I have this JQuery piece of code. I want to see wht php outputs.
So I have this piece of code in my displaytemplate: @Html.DropDownListFor(blah => blah.InputtedData, ddv)
I have this piece of html code: <div id=main style= margin:0 auto; > <div
I have this piece of code in a .cshtml. @using (Html.BeginRouteForm(CheckoutShippingAddress, FormMethod.Post)) { <div

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.