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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:39:26+00:00 2026-06-04T19:39:26+00:00

Here is my problem. I am editing a website that is generating all the

  • 0

Here is my problem. I am editing a website that is generating all the content of the website in a loop from the server side to the PHP and then I am asked to manipulate the website using jQuery.

The question here is that, a lot of link tags that exists on the website have no IDs associcated with them. So I am asked to solve a problem, where if one of the link tags is clicked, some jQuery logic takes place.

In my case, if link tag with text “See All” is clicked. I am supposed to carry out some code execution but how exactly do I write it?

Is it as simple as writing:

$("a:contains('See All')").click(function() {
  // do something
});

because that doesn’t seem to be working. Any help?

  • 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-04T19:39:28+00:00Added an answer on June 4, 2026 at 7:39 pm

    Exact matching for See All and so on

    $("a")
         .filter(function() {   // apply filter() to for exact text matching
              return $(this).text() == 'See All';
         }).click(function(e) {
              // To prevent page reload you need .preventDefault()
              e.preventDefault();
              alert('hello');
         });
    

    DEMO

    Check containment of See All (not exact match)

    $("a").filter(function() {
        return $(this).text().match('See All'); // a little change here
    }).click(function() {
        alert('hello');
    });
    

    or just use :contains()

    $('a:contains(See All)').on('click', function() {
       alert('Hello');
    });
    

    DEMO

    Some extra note

    If your links generate after DOM ready then you need to try with “.on” event binding like:

    $('#container').on('click', 'a:contains(See All)', function() {
      alert('Hello');
    });
    

    and in case the client was using jQuery v-1.7, then try “.delegate” event as follows:

    $('#container').delegate('a:contains(See All)', 'click', function() {
      alert('Hello');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

date here my problem: String datetime = 2012-03-24 23:20:51; I know that that string
Ok, please look at my problem: http://phone7forum.com/viewforum.php?f=2 http://phone7forum.com/viewtopic.php?f=2&t=4 I've been editing a phpBB forum
Here is the situation: PRODUCTION SERVER Website A (/home/a/www) Website B (/home/b/www) Website C
I have a telerik grid that shows a drop-down when editing. The problem is,
Here's the situation: I have a web-based ticket application, multiple users. One problem that
Maddening problem here. When my page loads: <body onload=getClientDateTime();> It runs this function: document.getElementById('ClientDateTime').value=hello
Super weird problem here. I'm having trouble getting jQuery to bind any selectors except
I got a problem here, when I used ajax to send a form it
I Have a problem here. i wanna to test my parser result. i have
need some help here My problem is, my app starts with a single view,

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.