Question: Javascript code using Queryselectorall() // 1) Write a Javascript function that takes TWO parameters: element and class. The element should be a DOM object, NOT
Javascript code using Queryselectorall()
// 1) Write a Javascript function that takes TWO parameters: element and class. The element should be a DOM object, NOT a string. The class can be a string. The function should add the designated class to the element. // 2) Write another function that takes TWO parameters: selector and class. The "selector" can be a string. The function should add the designated class to any element matching that selector. what i have so far: var function addClassToElement(el, cls)f 12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
