function findHint(hintList, hintSelection) {
            var i, l;
            for (i = 0, l = hintList.length; i < l; ++i) {
                var current = hintList[i].data("token");
                if (hintSelection === current.value) {
                    return i;
                }
            }
            return -1;
        }
Find the index of a string in a list of hints.
@param {Array} hintList - the list of hints
@param {string} hintSelection - the string represenation of the hint
 to find the index of
@return {number} the index of the hint corresponding to the hintSelection