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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:18:14+00:00 2026-05-25T23:18:14+00:00

I have html like this <h2 class=Comprehensive Leadership>Comprehensive Leadership</h2><a href=/topic/comprehensiveleadership>View all Comprehensive Leadership Programs

  • 0

I have html like this

 <h2 class="Comprehensive Leadership">Comprehensive Leadership</h2><a href="/topic/comprehensiveleadership">View all Comprehensive Leadership Programs </a>
 <br><a href="/programs/pld/Pages/default.aspx" class="Comprehensive Leadership">Program for Leadership Development &gt;</a><br>Dec 2011–Jun 2012<br><a href="/programs/gmp/Pages/default.aspx" class="Comprehensive Leadership">General Management Program &gt;</a><br>Jan–May 2012<br>


<h2 class="Corporate Governance">Corporate Governance</h2><a href="/topic/corporategovernance">
View all Corporate Governance Programs </a><br><a href="/programs/ac/Pages/default.aspx" class="Corporate Governance">Audit Committees in a New Era of Governance &gt;</a><br>Nov 13–15, 2011<br><a href="/programs/cc/Pages/default.aspx" class="Corporate Governance">Compensation Committees &gt;</a><br>Nov 16–18, 2011<br>

<div class="tabbed-content"><ul class="tabs"><li><ul><li><a href="#" class="Comprehensive Leadership">Comprehensive Leadership</a></li><li><a href="#" class="Corporate Governance">Corporate Governance</a></li><div>

If I click Comprehensive Leadership it should only display first h2 tag by matching the class till next h2 tag, that is :

<h2 class="Comprehensive Leadership">Comprehensive Leadership</h2><a href="/topic/comprehensiveleadership">View all Comprehensive Leadership Programs </a>
 <br><a href="/programs/pld/Pages/default.aspx" class="Comprehensive Leadership">Program for Leadership Development &gt;</a><br>Dec 2011–Jun 2012<br><a href="/programs/gmp/Pages/default.aspx" class="Comprehensive Leadership">General Management Program &gt;</a><br>Jan–May 2012<br>

I can change the html little bit…i have also paste it here : http://jsfiddle.net/sMCsw/10/

  • 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-25T23:18:15+00:00Added an answer on May 25, 2026 at 11:18 pm

    A better solution would be not to select by class, but by the actual value of the H2 using this:

    function showByText(text){
        $("h2:contains('" + text + "')").show();
        // added a return false to prevent the a href from actually executing
        return false;
    }
    <a href="/programs/pld/Pages/default.aspx" onclick="return showByText(this.text();">Comprehensive Leadership</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have HTML like this: <a href=# class=modalInput glow rel=#newsletter >Newsletter!</a> This opens a
I have html like this. <span class=gallery-open-item year-icon-Yes 2010> <a href=/year/none> </a> </span> I
I have a (semantically incorrect) HTML like this: <ul> <li class=year>2009</li> <li><a href=project1.html>Project 1</a></li>
I have a HTML code like this: <div class=links nopreview><span><a class=csiAction href=/WebAccess/home.html#URL=centric://REFLECTION/INSTANCE/_CS_Data/null>Home</a></span>&nbsp;•&nbsp;<span><span><a class=csiAction href=/WebAccess/home.html#URL=centric://SITEADMIN/_CS_Site>Setup</a></span>&nbsp;•&nbsp;</span><span><a
i have my html something like this... <div class = content> <div class =
I have HTML like this: <div> <a href=>sometext<img src=images/001.jpg /></a> <a href=>sometext<img src=images/002.jpg /></a>
I have html code like this <tr class=odd> <td><b>Reason for Termination:</b></td> <td>this has bunch
I have HTML code like this: <asp:LinkButton ID=AddButton runat=server OnClick=AddPatientBtn_Click> <span class=Normal>Add</span> </asp:LinkButton> I
I have HTML like this : <li class=MostViewedProducts> <input class=MostViewedProductsi type=checkbox checked=checked/> <span class=labels>Some
I have generated html like this: <div class=row> <div class=item google></div> <div class=item mail></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.