a gesture recognizer in javascript