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
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...
});