title: Find a class in a jQuery object and append HTML ul to it
body: <p>In the above javascript object, I want to be able to find the class .inject and append a ul, li to it. How can it be achieved?</p>
  
  <pre><code>var $variable = $('&lt;h5&gt;'+ opts.fields.ac_firstname +' '+ opts.fields.ac_lastname+ ' ('+opts.fields.ac_source_id +')&lt;/h5&gt;&lt;div class="inject"&gt;&lt;append ul li here&gt;&lt;/div&gt;&lt;p style="font-weight:bold; margin:1em 0 0;"&gt;View Summary&lt;/p&gt;&lt;div class="bcCallToAction"&gt;&lt;a href="" target="_blank"&gt;Visit google.com&lt;/a&gt;&lt;/div&gt;');
  </code></pre>
  
  <hr>
  
  <p>Tried this but dint work</p>
  
  <pre><code>  if(opts.fields.ac_othernames.length &gt; 1){               
                          $.each(opts.fields.ac_othernames, function(k, v){
                               altNameMarkup += '&lt;li&gt;' + v + '&lt;/li&gt;';
                          });
                          var $ulAltNms = $('&lt;ul&gt;');
                          $ulAltNms.append(altNameMarkup);
                          $variable.find('.inject').append($ulAltNms);
  
                      }
  </code></pre>