From a once over:
- I am not a native English speaker but
//Element to print HTMLconfused me, I thought you meant that element would be printed. Maybe//PrintHTML buttonelements selectorsto be printed? settingsshould be declared next todefaults, otherwisedelete settings;is meaningless indestroy( see comment )elems=$(settings.elems);should bevar elems = $(settings.elems);otherwise you pollute the global namespace- You declare
var itwice in a for loop - You should consider removing the
iframeindestroy
All in all very clean, maintainable code.