select a class in jquery with no event?

Hi at the minute I am selecting classes like so...

$('.colorPick').each(function() {
});

Is there a way to select a class name with no event attached, ie in this case

.each

I have tried,

$('.colorPick').(function() {
   });

But it doesn't work?

Answers


Maybe this can be used to filter out elements with events already attached: How to check if any JavaScript event listeners/handlers attached to an element/document?


Do you mean like this?

var $colorPics = $('.colorPick');

$colorPics will be a jQuery object (which is a container) and will hold the elements.


Need Your Help

Inner methods variable scope

c# .net

Will the variable uiContext go out scope after the event handler return? What does the compiler do behind the scene to make this code work.