title: jquery create new div with using array value as id
body: <p>hi am trying to create a new div but using the value from an array for its id</p>
  
  <pre><code>var divID = 'borough_'+BoroughTagger.myIdArray[intIndex];
  jQuery('&lt;div/&gt;', {  
      id: divID  
  }).appendTo('#results');
  </code></pre>
  
  <p>doesn't seem to work ? any ideas?
  UPDATE:
  removed comma from the line <code>id: divID</code>,
  <code>&lt;div&gt;&lt;/div&gt;</code> is now created but no id property is created.</p>
  
  <p>From what ive tried so far the following from joes answer works:
  $('#results').append('');</p>
  
  <p>ie a div is created : <code>&lt;div id="borough_2"&gt;&lt;/div&gt;</code></p>
  
  <p>i am performing an ajax call after creating this div and wish to do:</p>
  
  <pre><code>success: function(data){
      // data retrived ok
      var myData = data;
      $("boroughId=" + BoroughTagger.myIdArray[intIndex]).html(myData)
  }
  </code></pre>
  
  <p>using joes method the div is created but i still cant reference it to append the data recived from the ajax request. is there some scope problem perhaps?</p>