Posted By

mdrisser on 03/05/10


Tagged

mootools


Versions (?)

MooTools Class Template


 / Published in: JavaScript
 

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

MooTools Class Template by David Walsh

  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. });

Report this snippet  

You need to login to post a comment.