Skip to content

How to work with DOM using Javascript. For example, accessing DOM elements, changing their contents, show/hide them based on conditions, using data-* attribute, display dynamic data, and more!

Notifications You must be signed in to change notification settings

AhlamKhalid/Manipulate-DOM-with-Javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manipulate DOM with javascript

In this project, I show how to work with DOM (Document Object Model) using Javascript. We're working with:

  • Access DOM element using getElementById and querySelector
  • change DOM content using innerHTML and textContent
  • Show/hide elements using conditional ternary operator
  • setAttribute method
  • forEach Array method
  • template strings
  • classList property
  • HTML data-* attribute
  • dataset property

YouTube tutorial

Manipulate DOM with javascript

Run

Open index.html in your favourite browser!

About

How to work with DOM using Javascript. For example, accessing DOM elements, changing their contents, show/hide them based on conditions, using data-* attribute, display dynamic data, and more!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published