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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:15:14+00:00 2026-05-16T07:15:14+00:00

In the below html snippet I am trying to create a JQuery Expression to

  • 0

In the below html snippet I am trying to create a JQuery Expression to select all a tags with class zz1_TopNavigationMenu_1 Napa1-topnav zz1_TopNavigationMenu_*”

I am confused about constructing the select syntax that contains spaces in the class name. I also want a wild card at the end which is depicted above by the ‘*’ char at the end.

<table class="Napa1-topnav zz1_TopNavigationMenu_4" border="0" cellSpacing="0" cellPadding="0">
<tbody>
<tr>
<td style="white-space: nowrap;">
<a class="zz1_TopNavigationMenu_1 Napa1-topnav zz1_TopNavigationMenu_3" style="border-bottom-style: none; border-right-style: none; border-top-style: none; font-size: 1em; border-left-style: none;" href="/sites/Brand1/SubSite
  • 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-16T07:15:14+00:00Added an answer on May 16, 2026 at 7:15 am

    If those are the only 3 classes, and you’re certain they will appear in that order, you could use a attribute-starts-with selector.

    Try this:

    $('a[class^=zz1_TopNavigationMenu_1 Napa1-topnav zz1_TopNavigationMenu_]')
    

    This will select <a> elements where the class attribute starts with zz1_TopNavigationMenu_1 Napa1-topnav zz1_TopNavigationMenu_.

    • http://api.jquery.com/attribute-starts-with-selector/

    Alternatively, you could get elements with the first two classes, and use a filter to make sure it ends with the third class. The way it is written, it assumes your “wildcard” character will be a number or numbers.

    $('a.zz1_TopNavigationMenu_1.Napa1-topnav').filter(function() {
        return /zz1_TopNavigationMenu_\d+$/.test($(this).attr('class'));
    });
    
    • http://api.jquery.com/filter/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please see my current html snippet is as below. I am trying to make
htmlparser.Parser, I have the snippet of html(see below) and i need to get the
Conside below html - <div class=container1> <div class=container2> <div class=container3> <div class=container4> <div class=element>
The snippet below loops through some web pages, grabs the html and then looks
I'm trying to create a calendar in an HTML table design with CSS element
I have the following HTML snippet: <body> <div class=main> <div class=topBar> <p>testing</p> </div> <div
I am trying to generate a simple jQuery code snippet in JavaScript and append
I've got a very simple snippet of HTML (below) - and both sections seem
i'm trying to isolate all the server names (i.e sv012-cali) from within an html
Hey, I am trying to get the class names dynamically for the script below.

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.