Category: JavaScript/Jquery

Class ,Object and Constructor in JS

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   >>

Navbar Fixed JS Code Logic

<script> var navbar = document.querySelector('.fixed-top'; window.onscroll = function() { // pageYOffset or scrollY if (window.pageYOffset > 0) { navbar.classList.add('scrolled') } else { ...
READ MORE   >>

innerHTML vs createElement in DOM

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 using Manipulating Elements

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

    • Copyright © 2020 (Er. Shairy Kalra). All Rights Reserved