JavaScript / jQuery DOM Selectors
jQuery vs JavaScript
jQuery was created in 2006 by John Resig.
It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations, and Ajax.
For more than 10 years, jQuery has been the most popular JavaScript library in the world.
However, after JavaScript Version 5 (2009), most of the jQuery utilities can be solved with a few lines of standard JavaScript:
Finding HTML Element by Id
Return the element with id="id01":
jQuery
myElement = $("#id01");
Try it Yourself »
JavaScript
myElement = document.getElementById("id01");
Try it Yourself »
Finding HTML Elements by Tag Name
Return all <p> elements:
jQuery
myElements = $("p");
Try it Yourself »
JavaScript
myElements = document.getElementsByTagName("p");
Try it Yourself »
Finding HTML Elements by Class Name
Return all elements with class="intro".
jQuery
myElements = $(".intro");
Try it Yourself »
JavaScript
myElements = document.getElementsByClassName("intro");
Try it Yourself »
Finding HTML Elements by CSS Selectors
Return a list of all <p> elements with class="intro".
jQuery
myElements = $("p.intro");
Try it Yourself »
JavaScript
myElements = document.querySelectorAll("p.intro");
Try it Yourself »
★
+1
Reference: https://www.w3schools.com/js/js_jquery_selectors.asp
JavaScript / jQuery DOM Selectors
-
sibil36237
- Posts: 0
- Joined: Fri Jun 20, 2025 5:49 pm
Re: <t>JavaScript / jQuery DOM Selectors</t>
There are times when reading the news feels more like a routine than a thoughtful activity, especially when information is presented too quickly. This often affects how much is actually retained. During a search for more consistent material, I came across www.whyweare.co.za and explored a few articles. The flow appears more stable, giving each section enough space to develop. This creates a more balanced experience, where the reader can stay focused without feeling rushed or distracted by abrupt transitions between ideas.