JSON for President Read the JSON file
Presidents.json. Use the information to populate a
select with the names of the Presidents. When the user selects a president using the drop-down select the
name, dates and nickname of the president should be displayed as should the corresponding image of
the president.
Uses images contained in
PresidentZip.zip
Uses NFL.zip Read the JSON file contained in the zip. Use its data to populate the
eight drop-down selects. (I gave my selects id's like selAFCEast, selNFCEast, etc. That way I could
use concatenation to construct the select id and avoided a lot of if's.) You are allowed to write eight select
change event handlers (they should change the image and data) but the task can be accomplished with one. Mine
started like
$("select").change(function () {
var myIndex = $(this).val();
Of all of the elements (in the above case selects) $(this) means the one the user actually interacted with.
You should "trigger" the change events of your selects at the end of the .getJSON method. Again you are
allowed to have eight trigger statements, but it can be done with one using $("select") which deals with
all of the select elements.
Styling the width of the selects and images can make your page look more uniform and keep it from "jumping" around
if a team or coach selected has an especially long or short name.