// Create a jquery plugin that prints the given element. jQuery.fn.print = function(){ // NOTE: We are trimming the jQuery collection down to the // first element in the collection. if (this.size() > 1){ this.eq( 0 ).print(); return; } else if (!this.size()){ return; } // ASSERT: At this point, we know that the current jQuery // collection (as defined by THIS), contains only one // printable element. // Create a random name for the print frame. var strFrameName = ("printer-" + (new Date()).getTime()); // Create an iFrame with the new name. var jFrame = $( "