$('div#info div#checkboxDiv div.checkboxDivCat a[data-order-status-id]').each(function () {
var statusId = $(this).data('order-status-id');
var defaultStatus = [0, 3, 4, 5];
$(this).removeClass('active');
if ((defaultStatus.indexOf(statusId) > -1)) {
$(this).addClass('active');
}
});
Last active
January 8, 2018 09:51
-
-
Save andrewmmc/0355d3db4bf051069b604e1b6a20769f to your computer and use it in GitHub Desktop.
[Javascript] Check if variable exist in array
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment