Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to show specific div as a Print Preview? #15

Open
billytsr opened this issue Nov 8, 2013 · 2 comments
Open

Is it possible to show specific div as a Print Preview? #15

billytsr opened this issue Nov 8, 2013 · 2 comments

Comments

@billytsr
Copy link

billytsr commented Nov 8, 2013

Is it possible to show specific div as a Print Preview instead of showing complete Page?I'm preferring dynamic div through Javascript or jQuery. Thanks.

@srnimesh
Copy link

yes, im also have the above mentioned doubt. I t takes the whole preview of a page. Is any solution for this?
Thanks

@jurgen-74
Copy link

I have a solution but it is not really satisfying:
<style>.no-print{display: none;}</style>

<div class="no-print" id="001">

<script type="text/javascript" >$("#001").hover(function() { $(this).removeClass("no-print");}, function() {$(this).addClass("no-print");});</script>

HERE YOUR CONTENT OF THE DIV AND YOUR PRINT BUTTON:

<a class="print-preview" href="#" >print this part only</a>

</div>

The trick here is that when the user goes to the print button his mouse hovers over that area. This action removes the no-print class and makes the area visible for the plugin. You can see an example here: http://www.apologeet.nl/faq/tegenstrijdigheden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants