matchesSelector()

Returns a boolean indicating if the supplied element matches the supplied CSS selector.

Syntax

var result = behavior.matchesSelector(element, selector);

Example

var mybehavior = jsb.behavior.extend({
  onmouseover: function(element) {
    if (!this.matchesSelector(element, ":focus")) {
      this.showToolTip(element);
    }
  }
});

See Also