Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
jquery Syntax error, unrecognized expression when class name is encrypted and contain special character
var className  = "order_enc_YUluWTo6ODA4OTczNjQ3MjAzOTc0OA%3D%3D";
$('input:checkbox.' + className).each(function() {
            (this.checked ? arr.push($(this).val()) : "");
        });

having encrypted class name but when trying to run loop getting error Uncaught Error: Syntax error, unrecognized expression: input:checkbox.order_enc_YUluWTo6ODA4OTczNjQ3MjAzOTc0OA%3D%3D

tried single double quots but with no success.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try this way

<input type="checkbox" class="order_enc_YUluWTo6ODA4OTczNjQ3MjAzOTc0OA%3D%3D" value="true">

var className  = "order_enc_YUluWTo6ODA4OTczNjQ3MjAzOTc0OA%3D%3D";
$('input:checkbox[class="'+className+'"]').each(function() {
    (this.checked ? arr.push($(this).val()) : "");
});
about 4 years ago · Juan Pablo Isaza Report

0

    // Connect in HTML file the src for the CryptoJs Lib
 /* <script type="text/javascript" 
 src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"> 
 </script> */
 let className  = "order_enc_YUluWTo6ODA4OTczNjQ3MjAzOTc0OA%3D%3D";
 let decrypt = CryptoJS.AES.decrypt(className,'Secure className');
 let decryptToString = decrypt.toString(CryptoJS.enc.Utf8);
 $('input' + decryptToString).each(function() {
        ($(this).checked ? arr.push($(this).val()) : "");
        console.log($(this).val())
    });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!