title: Adding class to text item inside div in jquery
body: <p>I have a div 'usercontainer' that will contain individual names. I want to add a class to these names so that later on hover and onlclick functions can be added. I'm using the below method but that does not add the 'namecontainerclass' to each individual name but simply appends to the whole div, so that when I hover over one name, the entire div changes color.</p>
  
  <p>JQuery code:</p>
  
  <pre><code>function display(userArray) {
  
  for(i=0; i&lt;userArray.length; i++)
  {
      $('#usercontainer').append(userArray[i].name +'&lt;/br&gt;').addClass('namecontainerclass');
  }
  
  };
  </code></pre>