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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:09:26+00:00 2026-05-27T16:09:26+00:00

I want to represent that in jquery: var menuItems = document.getElementsByTagName(li); for (var k

  • 0

I want to represent that in jquery:

    var menuItems = document.getElementsByTagName("li");
for (var k = 0; k < menuItems.length; k++)
{
    if (menuItems[k].className == "menu")
    {
        var child = menuItems[k].firstChild;
        if (child.className == "menulink")
        {
            var tempSum = 0;
            tempSum += child.href.indexOf("bwshop");
            tempSum += child.href.indexOf("report");
            tempSum += child.href.indexOf("tutorial");
            tempSum += child.href.indexOf("chat");

            if (tempSum > 0) child.style.display = "none";
        }
    }
}

This is my fail not working code:

$("li.menu > a.menulink").filter(':contains("bwshop"), :contains("report"), :contains("tutorial"), :contains("chat")').hide();
  • 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-27T16:09:27+00:00Added an answer on May 27, 2026 at 4:09 pm

    The :contains selector reads the inner text of the tag whereas your original code is searching in the href attribute.

    You could change your code to use different selectors:

    $("li.menu > a.menulink").filter('[href*="report"], [href*="tutorial"], [href*="chat"]').hide();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to parse a string that represent a DateTime in UTC format. My
We have objects that we want to represent in stacks (think of stacking items
I have a complex JSON object that I want represent as C# class. I
I want to create a global object that represents the current user in Code
I want to create a 2d array that represents my 2d canvas. For each
I want to add a string to a variable name that represents an integer.
I have a map that represents a DB object. I want to get 'well
I have a PersonEditorModel that contains a list of people that I want represented
I want to represent a DAG as JSON text and wondering if anyone has
In SQL Server 2008, I want to represent an integer as a 3-character string

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.