Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<a href="#" class="wsl_print" data-target=".search-results">
Print element
</a>
jQuery('body').on('click', '.m_print', function (e) {
e.preventDefault();
var target = jQuery(this).data('target');
jQuery(this).closest(target).printThis({
importStyle: true
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.