You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.1 KiB
1 lines
1.1 KiB
(function(n){var t;n.fn.jqprint=function(i){var e,r,f,u;t=n.extend({},n.fn.jqprint.defaults,i);e=this instanceof jQuery?this:n(this);t.operaSupport&&n.browser.opera?(r=window.open("","jqPrint-preview"),r.document.open(),u=r.document):(f=n("<iframe />"),t.debug||f.css({position:"absolute",width:"0px",height:"0px",left:"-600px",top:"-600px"}),f.appendTo("body"),u=f[0].contentWindow.document);t.importCSS&&(n("link[media=print]").length>0?n("link[media=print]").each(function(){u.write("<link type='text/css' rel='stylesheet' href='"+n(this).attr("href")+"' media='print' />")}):n("link").each(function(){u.write("<link type='text/css' rel='stylesheet' href='"+n(this).attr("href")+"' />")}));t.printContainer?u.write(e.outer()):e.each(function(){u.write(n(this).html())});u.close();(t.operaSupport&&n.browser.opera?r:f[0].contentWindow).focus();setTimeout(function(){(t.operaSupport&&n.browser.opera?r:f[0].contentWindow).print();r&&r.close()},1e3)};n.fn.jqprint.defaults={debug:!1,importCSS:!0,printContainer:!0,operaSupport:!0};jQuery.fn.outer=function(){return n(n("<div><\/div>").html(this.clone())).html()}})(jQuery);
|