A class can be defined by using a class keyword with any particular name. In JavaScript, the name of the class always starts with an uppercase letter and object is the instance of class through which we can access the member of... READ MORE >>
<script> var navbar = document.querySelector('.fixed-top'; window.onscroll = function() { // pageYOffset or scrollY if (window.pageYOffset > 0) { navbar.classList.add('scrolled') } else { ... READ MORE >>
Following Example explain the differences between innerHTML and createElement when it comes to creating new elements. Example of create Element <body> <div class="container"></div> <script> let div =... READ MORE >>
Task 1 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <ul id="menu"> <li>Home</li> <li>Services</li> </ul> ... READ MORE >>
Recent Comments