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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:00:42+00:00 2026-06-16T21:00:42+00:00

Just upgraded from jQuery 1.3.2 to 1.8.2 and found that several functions that worked

  • 0

Just upgraded from jQuery 1.3.2 to 1.8.2 and found that several functions that worked in 1.3.2 no longer work. Most of these I’ve fixed, but stuck on this one:

I need to search based on the first few characters within a table cell (a “starts-with” search), but this code no longer works in recent versions of jQuery:

var matchingElements = $("#tblSelect1>tbody>tr>td:first-child[innerText^='" + text + "']");

I suspect it has something to do with the fact that several things that used to work like attributes are now properties instead – innerText is a property (I think) and so maybe it is not compatible with the attribute starts-with selector notation: [attr^='value']

I do not want to use :contains because I only want the elements whose innerText starts with the search text

Thoughts? Thanks!

  • 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-16T21:00:44+00:00Added an answer on June 16, 2026 at 9:00 pm

    You can use filter method. innerText is a non-standard property and doesn’t works on Firefox, for supporting all the main browsers you should check both the properties, or use jQuery text method which is cross-browser.

    var $matchingElements = $("#tblSelect1 > tbody > tr > td").filter(function(){
          var c = this.textContent || this.innerText;
          return c.indexOf(text) === 0
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE 1: I've just upgraded from jquery 1.4.4 to 1.6.1. How does that effect
I just upgraded my jQuery from 1.3.2 to 1.4.2, and I think it's giving
I just upgraded from rails 2.3.5 to rails 2.3.8, but now my redirects are
I just upgraded from Dojo 1.4.3 to 1.5.0 and noticed that my legend is
I have a C# 4.0 Winform app that I just upgraded from 3.5 to
I just upgraded GlassFish from 3.1.1 to 3.1.2. My app deploys, but bombs out
just upgraded from jquery 1.4.2 to 1.4.4 and i've encountered a performance problem which
Looking for a best practice here. But I just recently upgraded an app from
I just upgraded my app from 3.2.2 to 3.2.8. I use jquery-tooltip. Once I
I just upgraded to JQuery 1.5.2 from 1.4 and my PostForm is not working

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.