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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:05:40+00:00 2026-05-16T11:05:40+00:00

For some strange reason, whenever I have a selector and expect to get multiple

  • 0

For some strange reason, whenever I have a selector and expect to get multiple items, jQuery is only returning the first item, instead of the entire collection.

This is the HTML I have:

<a id="reply-424880" class="reply" href="#" rel="nofollow">Reply</a>
<a id="reply-424885" class="reply" href="#" rel="nofollow">Reply</a>

And the selector:

$('.reply').unbind('click').click(function(event) {
 ...
}

I have tried debugging using FireBug, and still get the same results. Using the work around I can get it to work:

$('a').each(function (index, element) {
            if ($(element).attr('class') == 'reply') {
                $(this).unbind('click').click(function(event) {
                     ...
                });
             }
});

I would like to use the built-in functionality instead of my work around. Any idea why only the first element would be returned?

  • 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-16T11:05:41+00:00Added an answer on May 16, 2026 at 11:05 am

    After leaving the workaround in place for a couple of months, I decided to try to see if there was anything on the page that was causing the problem.

    By process of elimination, I was able to narrow down the error to the jquery.validate.js file. For some unknown reason, this file was causing the jQuery to only return the first value. I downloaded the latest version and the selectors now return all the elements that match.

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

Sidebar

Related Questions

greetings. i have an issue with the following code. for some reason whenever it
For some strange, bizarre reason, my images in my website just will not display
I have been noticing some very strange usage of O(1) in discussion of algorithms
For some strange reason, when I move a PHP file from one folder to
For some strange reason, the \n and \r escape sequences do not seem to
For some strange reason, UITableView resizes my cells to 320 width no matter how
For some strange reason, in iPhone OS 3.0 this doesn't work: I made a
For some strange reason, an alert dialog with the text title Message From Web
I'm getting some strange, intermittent, data aborts (< 5% of the time) in some
I've just started with opengl but I ran into some strange behaviour. Below I

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.