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

  • Home
  • SEARCH
  • 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 8362349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:55:05+00:00 2026-06-09T11:55:05+00:00

I have some code that has been working since it’s beginning, well over a

  • 0

I have some code that has been working since it’s beginning, well over a two months. The selectors had dynamic content, stored in the variable newClasses. My code used to be $("'" + newClasses + "'"), and about a two days ago, after I added separate functionality on the page, not effecting this code, and not importing any libraries or anything else, I got the error of

Uncaught Error: Syntax error, unrecognized expression: '.fs.btn.heading.abstract' code.jquery.com/jquery.min.js:2

AFTER a day of troubleshooting, I found that if i removed the "'" + and + "'", and it became $(newClasses), the functionality started working again. FYI: the variable newClasses did not include 's on either end of the string.

Now, I know this is somewhat of a different question, but what code could be added in a separate section to effect the functionality, and result in my having to remove the concatenation of the single quotes?

Notes –

  • I am not looking for code help to the webpage, more troubleshooting methodology and thinking answers.
  • due to the volume of code, and the different code that was added, it is pointless to post the code, but you can feel free to review the Git code here
  • I even tried reverting to a prior commit, and for some reason, it still had the same error.
  • I have deduced from my programming sessions that when the console refers to JS or JQuery on a low level line number (2 in this case), it usually has something to do with a trivial ;, ), or }, but JSLint didn’t show up that particular anomaly.
  • no browser change since then, but I did reboot, and potentially had system updates waiting to finish.

Is it possible that the API of jQuery changed? something else that I’m not thinking of? Your suggestions as to possible culprits is appreciated.

  • 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-09T11:55:05+00:00Added an answer on June 9, 2026 at 11:55 am

    The selector is just a string. If your variable is already a string type, then you don’t need to add quotes to each end and doing so will probably cause an error as there are not supposed to be quotes on each end of the string. So, $(var) should work just fine.

    Quotes are used to declare a string literal like:

    "#test"
    

    but are not needed if you already have the data in a variable. So, if you have a variable called sel that already contains the string #test, then you can just do:

    $(sel)
    

    The only time you might add quotes into a selector string is if you need quotes embedded into the middle of the string such as this selector:

    [data-myval='whatever']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a system that has some Bash scripts running besides Java code. Since
This isn't my code, I'm just troubleshooting it. Some code that has been working
I have some older (broken) code that has a join using a *= table1.ID
I have some code that creates some span tags and each span has its
I have a code that has some mpi api-dependent bits: #if MPIVERSION==1 ... #elif
I have an application that runs in fullscreen mode and has been working fine.
I have been working with .Net since VS2002 and since then any time that
I have some code that will change the background color of a specific label
I have some code that is supposed to return an NSString. Instead it is
I have some code that generates Visio masters for me, and some masters have

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.