I am attempting to add the jQuery Print Preview Plugin into my website but I use AddThis' Print Option. I am not sure if there is a way for me to add the print preview plugin using AddThis. Is there a way?
Here is my code:
JS:
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j('a.print-preview').printPreview();
});
AddThis Code:
<!-- AddThis Peekaboo Toolbox : BEGIN -->
<div class=addthis_toolbox addthis_peekaboo_style
addthis_default_style addthis_label_style addthis_32x32_style>
<a class=addthis_button_more>Share</a>
<ul>
<li><a class=addthis_button_facebook></a></li>
<li><a class=addthis_button_twitter></a></li>
<li><a class=addthis_button_google_plusone_share></a></li>
<li><a class=addthis_button_email></a></li>
<li><a class=addthis_button_print print-preview></a></li>
</ul>
</div>
<!-- AddThis Peekaboo Toolbox : END -->
<script type=text/javascript src=https://s7.addthis.com/js/
300/addthis_widget.js></script>
When I click print it pops up the standard print dialog box in Firefox (or whatever browser I am using.)
I have a feeling that the AddThis JS is using something like JavaScript:window.print();
to trigger the print dialog thus bypassing the jQuery Print Preview Plugin. Is there an easy way to change the AddThis behavior to trigger the print preview?