What is Selectors?
The document we have written in blue text with $ is called selectors.
And what is in the right side of the document, we call it method
Our selector part is written to target the dang of HTML or to select the dang element.
And after selecting you do the work you want to do in the method.
In this blog, the part which you select is learned in detail.
Which is our selector part, it basically consists of CSS selectors,
And which are basic selectors like -> Id, Class, Tag Name.
If you want to target an HTML element with id, then you can write for it as if we are showing the image above.
These were our basic selectors apart from this, there are also advance selectors
$(“*”) Advance selector gets first star (*) tag
Star means all the tags written inside HTML, if you want to target all of them within a page, or want to do CSS like that if you want to pink their HTML, then you can put star tags.
Example for Id:
Example for <li> Tag:
Example for Class Tag:
Example for (*) Star Tag:
- Checklist of Disaster Recovery Plan in Kubernetes (EKS) for GitLab - February 24, 2023
- Kubernetes: Pull an Image from a Private Registry using Yaml and Helm File - February 24, 2023
- Jenkins Pipeline code for Sending an email on Build Failure - February 24, 2023