How can I print the contents of a link?
<p>I want the contents of a link get printed by jQuery. What do i do?</p>

<p>Following is my code:<br>
<strong><a href="http://jsfiddle.net/9zLGZ/" rel="nofollow">DEMO:</a></strong></p>

<pre><code>&lt;a href="#" onclick="window.print(); return false;"&gt;Print&lt;/a&gt; 
​
$(document).ready(function() {
    $('ul#tools').prepend('&lt;li class="print"&gt;&lt;a href="#print"&gt;Click me to print&lt;/a&gt;&lt;/li&gt;');
    $('ul#tools li.print a').click(function() {
        window.open('www.google.com');
        window.print();
        return false;
    });
}); ​
</code></pre>
