Question: Please HELP with JQUERY and JavaScript 1.In the jquery.altrow.js file, code a plugin that uses the getElementsByTagName method to get all of an elements tr

Please HELP with JQUERY and JavaScript

1.In the jquery.altrow.js file, code a plugin that uses the getElementsByTagName method to get all of an elements tr child elements. Then, it should apply a class named header to the header row, and classes named even and odd on an alternating basis to the rest of the rows. Note: you can check whether a row contains th elements to see if its a header row.

2. In the altrow.js file, add code to the onload event that calls the plugin for the table element. Run the application and see that the row styles are applied to the table.

HTML file:

Alternating Row Plugin

Important People in Computer Science

First NameLast NameDate of BirthAccomplishment
CharlesBabbage12/26/1791 Originated the concept of a programmable computer, invented the first mechanical computer.
AdaLovelace12/10/1815 First computer programmer. Wrote an algorithm for Babbage's mechanical computer.
AlanTuring6/23/1912 Invented the Turing Machine, a hypothetical device that's a model of a general purpose computer.
GraceHopper12/9/1906 Invented the first compiler for a computer programming language, popularized the term "debugging" for fixing computer glitches.

query.altrow.js file:

"use strict";

(function ($) { $.fn.pluginName = function(){ return this.each(function() { //the code for the plugin }); }; }) (jQuery);

altrow.js file

"use strict";

window.onload = function() { };

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!