1. 程式人生 > >JQPRINT-不錯的jquery列印外掛

JQPRINT-不錯的jquery列印外掛

This plugin is designed upon the well known jPrintArea, with some improvements and functionalities corrections. Rewritten as true jQuery plugin!

Version 0.3: now supports Opera!

HOW IT WORKS
Just calling the jqprint() method on jQuery object or selector:

var o = $("#divToPrint");
o.jqprint();
// or
$("#divToPrint").jqprint();

$('#divOpera').jqprint({ operaSupport: true });

PARAMETERS

  • debug - Allows you to choose to make visible the iframe used for printing.
  • importCSS - Css links in original page will be imported into iframe.
    First it searchs for media='print', if there isn't, will be imported the normal css files.
  • printContainer
     - Indicates if the original selector object must be included into the print (attention: setting it to false may breaks your css rules).
  • operaSupport - Indicates if the plugin must support also Opera, in that case it provides to build a temporary tab to print.