Hello in this jQuery video I am going to cover the this keyword or the dis selector for selectors. So the this selector allows you to essentially select this, you know, particular element that has been triggered or selected. So in this case, we've got this no div selector, or a couple of divs and a paragraph. And if we click on the paragraph, nothing happens. I am not reloaded I modified some of the code as you can see, it's fine them perfectly hello world or second div. You know, he detects the clickbait detects the click for both.
But if we do this dollar this that just say, this particular element, not audience, but the particular element that triggered this one, do something with it. So let you know. First of all, what's going on. console, log it out. I always do in love doing console logs, or you know, some sort of login like that. So can actually see what's going on, especially when I'm learning.
Very powerful features simple but very powerful. Definitely recommend always doing this even when you're developing. Great way for debugging. For net, click that. As you can see, if we open that up, we got the div. And you know, it provides information about it with the actual base URL, and you know, plenty of other information as well, such as height.
And the content. Obviously, the content in HTML, the inner text is not this, whereas if I were to click on that one, that's true, get another one. And if I were to go to this one now, scroll down the HTML and the text is different so they get the particular one they clicked on. And I'm actually going to cover all of the different sort of features that you can do once you select And remember one of the things that you could do the dot height, and this will merely just hide it. So if I run it, click that. As you can see, it hides the particular one that is clicked.
Even though this selector is just apply to audience. This is applied to the particular div that triggered the Select and you can do you know so much more like change the HTML, ply, CSS animated, do whatever you want. But as long as you know the underlying principles of what we just covered here, they're all good to go. Thanks for watching you have any questions, feel free to pop me a message and I look forward to seeing you in the next video.