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: 
You can check whether `element.className` matches `/\bthatClass\b/`.  

`\b` matches a word break.

Or, you can use jQuery's own implementation:

```
var className = " " + selector + " ";
if ( (" " + element.className + " ").replace(/[\n\t]/g, " ").indexOf(" thatClass ") > -1 ) 

```

To answer your more general question, you can look at jQuery's [source code](https://github.com/jquery/jquery) on github or at the source for [`hasClass` specifically in this source viewer](http://james.padolsey.com/jquery/#v=1.5.0&fn=jQuery.fn.hasClass).
### Element.matches()

Instead of `$(element).hasClass('example')` in jQuery, you can use `element.matches('.example')` in plain JavaScript:

```
if (element.matches('.example')) {
  // Element has example class ...
}

```

[View Browser Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Browser_compatibility)