+ /**
+ * Highlight certain text in current nodes (by wrapping it in `<span class="highlight">...</span>`).
+ *
+ * @param {string} matchString String to match
+ * @param {Object} [options]
+ * @param {string} [options.method='splitAndHighlight'] Method of matching to use, one of:
+ * - 'splitAndHighlight': Split `matchString` on spaces, then match each word separately.
+ * - 'prefixHighlight': Match `matchString` at the beginning of text only.
+ * @return {[type]} [description]
+ */
+ $.fn.highlightText = function ( matchString, options ) {
+ options = options || {};
+ options.method = options.method || 'splitAndHighlight';