How to add year display script in $('body').append Script? <p>Javas experts, </p> <p>i have this script:</p> <pre><code>&lt;script type='text/javascript'&gt; //&lt;![CDATA[ $(document).ready(function() { var credits= $('body').append('&lt;div id="wrap"&gt;&lt;div id="wrapp-inner"&gt;&lt;div id="wrapleft"&gt;&lt;/div&gt;&lt;div id="wrapright"&gt;Designed Templatezy&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'); //]]&gt; &lt;/script&gt; </code></pre> <p>Now i want to add year script <code>&lt;script type='text/javascript'&gt;document.write(new Date().getFullYear());&lt;/script&gt;</code> to that <code>&lt;div id="wrapleft"&gt;</code> div:</p> <p><strong>see example below:</strong> </p> <pre><code> &lt;script type='text/javascript'&gt; //&lt;![CDATA[ $(document).ready(function() { var credits= $('body').append('&lt;div id="wrap"&gt;&lt;div id="wrapp-inner"&gt;&lt;div id="wrapleft"&gt; document.write(new Date().getFullYear());&lt;/div&gt;&lt;div id="wrapright"&gt;Designed Templatezy&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'); //]]&gt; &lt;/script&gt; </code></pre> <p>I add my year script as the above but it does not worked, i am not well expert in java or jquery, so please anyone can add this year script same to that id in append body. thanks and hope to see your reply.</p>