jQuery code blocks popup
<p>Here is online sample <a href="http://jsfiddle.net/bvJnM/" rel="nofollow">http://jsfiddle.net/bvJnM/</a>
Somehow linkedin profile doesn't pop up. Could someone please check my code?</p>

<pre><code>function excerpt(str, nwords) {
    var words = str.split(' ');
    words.splice(nwords, words.length - 1);
    return words.join(' ') + '&amp;hellip;' + '&lt;span&gt;Show&lt;/span&gt;';
}

var $div = $('.container');
$div.each(function() {
    var theExcerpt = excerpt($(this).text(), 30);
    $(this).data('html', $(this).html()).html( theExcerpt);
});

$('span').click(function() {
    var isHidden = $(this).text() == 'Show';
    var $div = $(this).parent();
    var theExcerpt = excerpt($div.text(), 30);
    $div.html( isHidden ? $div.data('html') : theExcerpt);
    $(this).remove();
});​
</code></pre>

<p>HTML</p>

<pre><code>&lt;script src="//platform.linkedin.com/in.js" type="text/javascript"&gt;&lt;/script&gt;

&lt;div class="container"&gt;
    Nulla varius diam at sem adipiscing pharetra. Integer eget nulla non purus commodo aliquam. Aenean sed nunc neque. Aliquam eleifend aliquam arcu, ac semper nulla faucibus id. Etiam luctus eleifend tempus. Vestibulum ornare, nisi vitae fermentum luctus, sem lectus rhoncus nibh, auctor iaculis magna turpis nec turpis. Aliquam orci tortor, vulputate at pretium sit amet, blandit eget libero. Sed posuere ultricies mi, sed rhoncus massa ultrices quis. Donec pulvinar vestibulum rhoncus. Donec urna lacus, mollis et convallis at, commodo nec lectus. Maecenas pretium, nunc ac volutpat tempus, dolor orci ultricies massa, eu malesuada urna massa ut orci. Duis eget elit nulla, ornare aliquet nulla. Sed eleifend scelerisque est, eu laoreet lacus ultricies id. Aenean aliquam porttitor augue, quis lacinia augue consequat vitae. Ut venenatis orci massa. Duis dignissim, justo at pellentesque adipiscing, ligula eros mollis tellus, ut accumsan lorem dui eu est.
    &lt;p&gt;&lt;/p&gt;
&lt;script src="http://platform.linkedin.com/in.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="IN/MemberProfile" data-format="click" data-id="http://www.linkedin.com/in/reidhoffman"
data-format="inline"  data-text="mynamehere"&gt;&lt;/script&gt;
</code></pre>

<p>after expanding the linkedIn link doesnt work...</p>
