/// /* * Print Element Plugin 1.2 * * Copyright (c) 2010 Erik Zaadi * * Inspired by PrintArea (http://plugins.jquery.com/project/PrintArea) and * http://stackoverflow.com/questions/472951/how-do-i-print-an-iframe-from-javascript-in-safari-chrome * * Home Page : http://projects.erikzaadi/jQueryPlugins/jQuery.printElement * Issues (bug reporting) : http://github.com/erikzaadi/jQueryPlugins/issues/labels/printElement * jQuery plugin page : http://plugins.jquery.com/project/printElement * * Thanks to David B (http://github.com/ungenio) and icgJohn (http://www.blogger.com/profile/11881116857076484100) * For their great contributions! * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Note, Iframe Printing is not supported in Opera and Chrome 3.0, a popup window will be shown instead */ ; (function (g) { function k(c) { c && c.printPage ? c.printPage() : setTimeout(function () { k(c); }, 50); } function l(c) { c = a(c); a(":checked", c).each(function () { this.setAttribute("checked", "checked"); }); a("input[type='text']", c).each(function () { this.setAttribute("value", a(this).val()); }); a("select", c).each(function () { var b = a(this); a("option", b).each(function () { b.val() == a(this).val() && this.setAttribute("selected", "selected"); }); }); a("textarea", c).each(function () { var b = a(this).attr("value"); if(a.browser.b && this.firstChild) { this.firstChild.textContent = b; } else { this.innerHTML = b; } }); return a("
").append(c.clone()).html(); } function m(c, b) { var i = a(c); c = l(c); var d = []; d.push("" + b.pageTitle + " "); if(b.overrideElementCSS) { if(b.overrideElementCSS.length > 0) { for(var f = 0; f < b.overrideElementCSS.length; f++) { var e = b.overrideElementCSS[f]; typeof e == "string" ? d.push('') : d.push(''); } } } else { a("link", j).filter(function () { return a(this).attr("rel").toLowerCase() == "stylesheet"; }).each(function () { d.push(''); }); } d.push(''); d.push(''); d.push('
' + c + "
"); d.push('