it now looks for the closest li instead of using the event target directly
wrong line removed
updated minified version