Hello, in this jQuery video, I am going to show you how to detect a double click has occurred on any element that you select in your jQuery or I should say new JavaScript file using jQuery. Okay, so I've already got this single click mask detection right here. If you're unsure what's happening, feel free to take a look at the most single click, and this is just extending on that. Okay, so to do you know, double click, I've got this paragraph as well, I'm actually going to duplicate this, but on the paragraph instead, actually, you know what, instead, I'm going to keep you in the div, but I'm gonna say a div is clicked on that single click, and then I'm going to double click, double click, and we just need to modify one last thing is the actual event itself. Instead Click, it's actually DBL click, which is short for double DB out a DB V, db L. And if I reload, and I click on the diff, you get single click, single click, and if I you know, doubletap it, as you can see it does double click, it also detects, you know, the single click as well.
So if you don't want that, just make sure you don't have this all you have some sort of, you know, if statement to prevent it. So that's how you detect double click. This double click event can be used in conjunction with the binding and the unbinding video that I created to feel free to have a go at that. And you can obviously just put an event object here as well. If you want to get information about the event that has occurred, you can do that with all events. That's it for this video.
Thanks for watching, and I look forward to seeing you in the next epic tutorial.