Question: In the Maven Standard Directory Layout where do I put Rules Engine files? Specifically, I'm using JBoss Rules (Drools), if that matters.

Answer: 
This 'hasClass' function works in IE8+, FireFox and Chrome:

```
hasClass = function(el, cls) {
    var regexp = new RegExp('(\\s|^)' + cls + '(\\s|$)'),
        target = (typeof el.className === 'undefined') ? window.event.srcElement : el;
    return target.className.match(regexp);
}

```

[Updated Jan'2021] A better way:

```
hasClass = (el, cls) => {
  [...el.classList].includes(cls); //cls without dot
};

```
Well all of the above answers are pretty good but here is a small simple function I whipped up. It works pretty well. 

```
function hasClass(el, cn){
    var classes = el.classList;
    for(var j = 0; j < classes.length; j++){
        if(classes[j] == cn){
            return true;
        }
    }
}

```