Submit your widget

very Simple jQuery print plugin

Created 13 years ago   Views 30128   downloads 5636    Author Cedric Dugas
very Simple jQuery print plugin
View DemoDownload
185
Share |

support:

Firefox 3.6
IE 7&8
Chrome latest

Printing is becoming more and more obsolete these days, however most website still do offer a print stylesheet . That being said print stylesheets are rarely perfect, when you start disabling some parts of your website you’re bound to forget a div or your layout will give you print headache.

there are already plugins to prints parts of your page. That being said the idea behind this plugin is that instead of opening a popup, the plugin creates an iframe and print it directly! This way you save yourself (and your users) the hassle of dealing with a new window.

Also, because you still link to your popup, if some of your users have javascript disabled, they could still open the special template and print it.

Using

$(".btnPrint").printPage()

Optional

There are some options available:
url: Overwrite the automatic url fetching in the href attribute
attr: change the default href attribute that is used to retrieve the print page URL.
message: The text message displayed before the print page is loaded

Tag: dialog