Append text to an HTML tag using javascript : <p>I am looking to use Jquery append to append text to a pre existing div element. I also want to have several element 'templates' and append more text into those elements (see snippet).</p>

<pre class="lang-js prettyprint-override"><code>var template = { template1: "&lt;p class='someclass'&gt;&lt;/p&gt;" },
    o = $('.divClass');
    o.append(template.template1); // Append text inside P tag
</code></pre>
