var productIds = $('label.'+ productId);


Inside of .each() I want to find out if the element collection of productIds also has a class of ‘checked’. How can I do that using jQuery’s hasClass()? Everything I try I get an error saying object.hasClass() is not a function.

if ($(this).is(".checked")) {


Thanks, I think this will work.