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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!