Auto create share this content from paragraph
<p>Hi I'm trying to automate content linking from text to share this…</p>

<p>there are 20 posts on each page that will need to be linked, i.e. why I've done #tweet01</p>

<p>this is my stub, but i think i'm missing something, any help is greatly appreciated, thanks in advance!</p>

<pre><code>&lt;p id="tweet01"&gt;When I was 10 I started washing cars. I then offered to clear paths for those without cars. I soon made money from most houses on my street.&lt;/p&gt;

  &lt;div class="stream-item-footer"&gt;
    &lt;ul class="tweet-actions"&gt;
        &lt;script type="text/javascript"&gt;
            var tweet = $("#tweet01").text()
            var shortTweet = $("#tweet01").text()    // get the text within the div
            .trim()    // remove leading and trailing spaces
            .substring(0, 100)    // get first 100 characters
            .split(" ") // separate characters into an array of words
            .slice(0, -1)    // remove the last full or partial word
            .join(" ") + "..."; // combine into a single string and append "..."
            $(document).ready(function() {
                    $().html('&lt;li&gt;&lt;span class="st_twitter" st_url="http://www.domain.com" st_title="'+ ++shortTweet +'"&gt;&lt;/span&gt;&lt;/li&gt;');
                    $().html('&lt;li&gt;&lt;span class="st_linkedin" st_url="http://www.domain.com" st_title="'+ ++tweet +'" st_summary="'+ ++tweet +'"&gt;&lt;/span&gt;&lt;/li&gt;');
                    $().html('&lt;li&gt;&lt;span class="st_facebook" st_url="http://www.domain.com" st_title="'+ ++tweet +'" st_summary="'+ ++tweet +'"&gt;&lt;/span&gt;&lt;/li&gt;');
                    $().html('&lt;li&gt;&lt;span class="st_googleplus" st_url="http://www.domain.com" st_title="'+ ++tweet +'" st_summary="'+ ++tweet +'"&gt;&lt;/span&gt;&lt;/li&gt;');
            });
        &lt;/script&gt;
     &lt;/ul&gt;
  &lt;/div&gt;
</code></pre>
