Detect click or double click on DOM elements