Operation Change!

Your mission, should you decide to accept it, is to define a function named changeColor that has three input parameters, representing a row, column, and color. Your changeColor() function should perform the following steps:

  1. Create a string that concatenates a hash mark, the word "cell" and the values of the parameters row and column (no spaces in the string!). For example:
      row = 3;
      col = 4;
      result = "#cell34"
    
  2. Change the background color of the element with that id to the color parameter. You may find the jQuery css() method useful here, along with the CSS "background-color" property.

Write your function definition on the whiteboard set aside for your team. After your definition has been cleared by one of your mission leaders (Scott or Anna), implement and test your function as follows:

Operation Change

This text should be displayed with a red background

This text should be displayed with a blue background

When you're done, upload the code file to the MI6 folder in the public_html directory of the cs110d account. Your mission leaders will give you the password.