Split string in half across 2 divs : <p>Looking to write a code that splits a string in half. For example, if the name entered is "Trishy", 6 letters, first 3 letters go into the the second <code>li</code> of <code>&lt;ul class="hardcover_front"&gt;</code> and the latter 3 letters go into the first <code>li</code> of <code>&lt;ul class="hardcover_back"&gt;</code>. </p>

<p>Note that I need this to apply for multiple names of varying character lengths.   </p>

<pre><code>&lt;div id="book1" class="book"&gt;
        &lt;ul class="hardcover_front"&gt;
            &lt;li&gt;&lt;/li&gt;
            &lt;li&gt;Tri&lt;/li&gt;
        &lt;/ul&gt;
        &lt;ul class="hardcover_back"&gt;
            &lt;li&gt;shy&lt;/li&gt;
            &lt;li&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;ul class="book_spine"&gt;
        &lt;/ul&gt;
&lt;/div&gt;
</code></pre>
