Skip to content

Instantly share code, notes, and snippets.

@dulimarta
Created September 14, 2018 04:13
Show Gist options
  • Save dulimarta/279c908d1b8744f4be9fa1bfcddec3d6 to your computer and use it in GitHub Desktop.
Save dulimarta/279c908d1b8744f4be9fa1bfcddec3d6 to your computer and use it in GitHub Desktop.
CS371 HW3 function stubs
/**
* Created by Hans Dulimarta
* TODO: Add your name below this line
*/
/**
* Given the ID of a node {rootId}, find all its descendant elements having
* its attribute id set and then change their class to {klazName}.
* The function returns the number of such elements found.
*
* @param rootId the ID of the "root" element to begin searching
* @param klazName the class to assign to each descendant whose id attrib
* is set.
* @returns {number}
*/
function findElementsWithId(rootId, klazName) {
/* complete this function */
return 0;
}
/**
* The following function finds all elements with attribute 'data-gv-row' (or
* 'data-gv-column') and create a table of the desired dimension as a child of
* the element.
*
* @returns NONE
*/
function createTable() {
/* complete this function */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment