MooTools Class Template


/ Published in: JavaScript
Save to your folder(s)

MooTools Class Template by David Walsh


Copy this code and paste it in your HTML
  1. var yourClass = new Class({
  2.  
  3. //implements
  4. Implements: [Options],
  5.  
  6. //options
  7. options: {
  8. yourOption: ''
  9. },
  10.  
  11. //initialization
  12. initialize: function(options) {
  13. //set options
  14. this.setOptions(options);
  15. },
  16.  
  17. //a method that does whatever you want
  18. yourMethod: function() {
  19.  
  20. }
  21.  
  22. });

URL: http://davidwalsh.name/mootools-12-class-template

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.