// ############################################### // # windowPrint.js for mootools v1.2+ # // # prints the page # // ############################################### var windowPrint = new Class({ //implements Implements: [Options], //options options: { collection: $$('a.print') }, //initialization initialize: function(options) { //set options this.setOptions(options); this.defaults(); }, //a method that does whatever you want defaults: function() { this.options.collection.each(function(el) { el.addEvent('click', function() { window.print(); return false; }); }); } }); // window.addEvent('domready', function() { // var defs = new buttonHover({ // collection: $$('button') // }); // });