Hello, in this jQuery video, I am going to show you the mouse down event. So with this simple click event already created. And if I go to the div any of the div class what the selector is essentially selected. When I click it, it prints actually dip. But what I want to do is hope I'm going to bring the mouth nearer to the mic now, just so you can hear the click a little louder. So hopefully, you can hear that click.
And let me just hover over it. I'm hovering over it. And if I click here, my finger is still down on the button. So it's essentially the button still down the left mouse button, it won't let go over now. So as you saw the this code is only triggered when the click has fully completed, so not when it's not activated, but when it's released, the mouth down however, so he selects something again, you can put anytime you want to dump most down function here, I'm gonna put console dot log, say, nose down. And now if I were to reload it and now though I brought the mouse back near the mic, so I'm going to click the mouse button the left mouse button, but not really watch what happens.
I think see the mouse down event is triggered so when the mouse is down, but not fully, you know release so it doesn't mean released yet. It triggers that code and they go release it. It triggers the clicked div code. So that is the difference between the mouse down and click. So if you want you know some sort of event while the method actually down, one of the use cases for this could be seen For a game or where you, you know, press a button, and an object needs to move across the screen, we don't want to, you know, constantly be you know, tapping it also I've got a mechanical keyboard so you should be able to hear this. But you don't be doing that you send to this to do this.
And you see it's moving. I only press the left key one of still hold it down, and just let it go net. So if you want some scenario like that the mouse down is the is the way to go. In the next video, I'll cover the mouse leave, not much. Leave the mess up. Sorry.
For any questions, feel free to drop me a message. And as usual, I look forward to seeing you in the next awesome Math video.