title: Any Event Listener
body: <p>Are there any Event Listeners that can be attached to a word.  So when the word is clicked, information like a definition can be displayed on the page.  Using jQuery</p>
  
  <p>Thanks,
  Adam  </p>
  
  <p>Sorry for not posting code.   I have to make it so that when the user clicks on the name of a person in the list, the box of data on the right side of the screen fills with the description of the location of the artwork.  Which is in my JSON file.</p>
  
  <p>Here is my code so far</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;hmtl lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8" /&gt;
          &lt;title&gt;AJAX&lt;/title&gt;
          &lt;link rel="stylesheet" href="styles.css" type="text/css" /&gt;
          &lt;script src="jquery.js" type="application/javascript"&gt;&lt;/script&gt;
          &lt;script src="ajax.js" type="application/javascript"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;div id="loaded-data"&gt;&lt;/div&gt;
        &lt;div id="result-box"&gt;&lt;/div&gt;
      &lt;/body&gt;
    &lt;/hmtl&gt;
  
  $(function() {
  
  let request = $.ajax({
    method: 'GET',
    url : 'people.json',
    dataType: 'json',
  });
  
  request.done(function(data) {
    let list = data.body.list;
    let resultBox = $('#result-box');
    let unorderedList = $('&lt;ul&gt;');
    resultBox.append(unorderedList);
  
    for (let person of list) {
      let listItem = $('&lt;li&gt;');
      listItem.text(person.name);
      listItem.attr('data-url', person.links[0].href);
      unorderedList.append(listItem);
    }
  
  });
  
  request.fail(function(response) {
    console.log('ERROR: ' + response.statusText);
  
  });
  
  });
  
    {
    "links":[{"rel":"self","href":"http://www.philart.net/api/people.json"},{"rel":"parent","href":"http://www.philart.net/api.json"}],
    "head":{"title":"People","type":"listnav"},
    "body":{
    "list":[
    {"name":"Adam","links":[{"rel":"self","href":"http://www.philart.net/api/people/325.json"}]},
    {"name":"Abigail Adams","links":[{"rel":"self","href":"http://www.philart.net/api/people/157.json"}]},
    {"name":"John Adams","links":[{"rel":"self","href":"http://www.philart.net/api/people/410.json"}]},
    {"name":"Samuel Adams","links":[{"rel":"self","href":"http://www.philart.net/api/people/439.json"}]},
    {"name":"Lin Zexu","links":[{"rel":"self","href":"http://www.philart.net/api/people/347.json"}]},
    {"name":"James A. Zimble","links":[{"rel":"self","href":"http://www.philart.net/api/people/345.json"}]},
    {"name":"Doris Zimmerman","links":[{"rel":"self","href":"http://www.philart.net/api/people/171.json"}]}
    ]
    }
    }
  </code></pre>