How to make lightbox open on double click/tap only?

I thought I could use a code like this but it doesn’t work:

$(document).ready(() => {
  $("#lightbox-project").click((event) => {

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

hi @anthonysalamin why you do not use only $("#lightbox-project").dblclick();. Is there any reason you have to cancel the click in jQuery? I was just today use it for different things but maybe MDN Doc will help but it is JS.




set two listeners:

  1. return on click
  2. action on dblclick

or … :person_shrugging:

EDIT: what I have now read on W3C there is this definition:

this event type MUST be dispatched after the event type click if a click and double click occur simultaneously, and after the event type mouseup otherwise.

So dblclick must be triggered after click but in your code is dblclick part of click

UI Events.