title: How to rewrite this function using jquery
body: <p>I'm trying to write shorter code using jquery. What is the best way to rewrite this function in jquery. </p>
  
  <pre><code>function searchDone(results) {
      var result = null;
      var parent = document.getElementById('resultList');
      parent.innerHTML = '';
      var child = null;
  
      for (var i = 0; i &lt; results.SearchResponse.Image.Results.length; i++) {
          result = results.SearchResponse.Image.Results[i];
          child = document.createElement('li');
          child.className = "resultlistitem";
  
          child.innerHTML = '&lt;a href="' + result.MediaUrl +'"&gt;&lt;img src="' +
              result.Thumbnail.Url +'" alt="' + result.Title +'" /&gt;&lt;/a&gt;';
  
          parent.appendChild(child);
      }
  }
  </code></pre>