Skip to content

Instantly share code, notes, and snippets.

@mircian
Created April 28, 2017 18:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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