I have a function where I am iterating over each .marker, creating a variable that contains its classes.
I also have an array named checkBoxClasses.
What I'm having a problem with is checking the classes within the variable markerClasses against the array checkBoxClasses. I want to break down the variable markerClasses and pass each individual class through the array.
Here's the code so far:
$('.marker').each(function () {
var markerClasses = $(this).attr('class').split(' ');
if ($.inArray(markerClasses , checkBoxClasses) > -1) {
//do something
};
});
markerClassthen use inarraymarkerClassesmatch thecheckBoxClassesor just 1 or more?