Created
December 12, 2021 12:44
-
-
Save YasirGaji/fdcbbc52da8b1c9d018da24b22053f53 to your computer and use it in GitHub Desktop.
This gist showcases specific children element selection its further explained in the DOD article by Yasir Gaji
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let val; // initilizing alpha variable | |
const list = document.querySelector('ul.showcase'); // assigning sub variable "list" to the ul in the html collection | |
val = list.children[1]; // HERE THE SPECIFIC METHOD SELECTION "children[1]" SELECTS THE SECOND CHILD OF THE PARENT ELEMENT | |
val.textContent = 'Ensure To Follow'; // here we manipulate the selected child and change it's text content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment