Hello, in this jQuery video, we are going to select an element based on its type. So you can have, you know, input element. And if you just apply two input elements, they can be applied to a variety of different type of elements. But we'll stick with the input and they got different tablet button, submit checkbox, you know, that sort of stuff. And we can check based on that. So if we create a few inputs, so input did this would usually be in the form, but for our purpose, we don't need for it to be in a form at all.
All we need to do is just, you know, create the input, we're going to create a few different ones. And the first one I'm going to create is of type. Text. value. No, it's fine. We don't need the value.
We're gonna put input. And this is going to be quite unlike that you can use any other input type about them keep it simple. Once you've got this all sorted, you can easily adapt it. So to select it, it's really, really easy. So you just got up and here input code number, and then the actual type. So type, let's say to say, button.
When clicked again, you could do whatever you want to change. You will change the attributes. The email was keeping it simple and using the click. So this is the selector. And here we're just going to say console dot log. reload it and we got these buttons he might be best if I actually provide you for the buttons.
So we can say you know, what you want for example, otherwise, no hard to see. Like me know reload. There we go. I clicked that button click button clicked button click, by click on this isn't selected, but I mean it doesn't print that if I change however, I reload the button don't work but these do so even though the no button will still detect an event such as click on it something to do back to button. If for example you want to detect, you know or select any type of you know what Input elements, you can do that really easily as well. You can just do.
Colon input for this will be all inputs and log and log in and click Save that reload. So that should trigger it. That should trigger it D should also trigger the input is clicked code simply because it's, you know, every single thing as an input. But if it's a button, it also prints out this code as well like then you can do for all you know the different input elements with a certain type of UI file submit checkbox radio password. You can even do for enabled and disabled to do that you've just replaced. This we've enabled for example and disabled for example, what I'm actually going to do is provide an amazing link where you can see all of the different features.
That's it. Thanks for watching, and I look forward to seeing you in the next video.