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

120
Views
correct jquery syntax on the each of the selector for checking class

I am trying to check for a class if it not exists then do some work, else skip it over

    $.each($(":not textarea.hasClass('encypted')", "#"+formID),function(k){ 
   do the code part
});

what i am doing here is to check if the textarea does not have a class encypted and only then go inside and do its work, if it has that class, just skip the entire code part

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

0

You can use :not() to directly select the textareas which do not have the given class:

$(`#${formID} textarea:not(.encrypted)`).each(function() {
  // your code here...
});
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!