etimbo/jquery-print-preview-plugin — pull request #4 by Zae (2012-02-01 10:45:20+00:00)
Title: Couldn't get it to work correctly in my project so had to make all these changes

Not all changes were needed, but I did them anyway to get the code a bit cleaner and easier to understand.

Basic changes:
+ Use $prefix on all jQuery variables
+ Use var print_frame_ref = $print_frame.get(0).contentDocument; to get contentDocument of iframe.
+ Use $print_frame.height($print_frame.contents().height()); to get/set height of iframe contents
+ Also clone() scripts to the iframe, (I needed them for my layout)
+ Use
$('img').on('load', print_frame_ref, function(){
$print_frame.height($print_frame.contents().height());
})
To bind load events of images inside the iframe.
+ Rename distroyPrintPreview to destroyPrintPreview.
+ Rename resize..printPreview.mask to resize.printPreview.mask

NOTE: Uses the new on method so requires jQuery 1.7