Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 14th, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var Myclass = new Class({
  2.         Implements: Options,
  3.         options: {
  4.                 option_one : "First Default Option",
  5.                 option_two : "Second Default Option"
  6.         },
  7.         initialize: function(options){
  8.                 this.setOptions(options);
  9.         },
  10.   logg: function()
  11.   {
  12.     console.log('logged');
  13.   }
  14. })
  15.  
  16. window.onresize = function(event) {
  17.   Myclass.logg();
  18. }
  19.  
  20. /*
  21. Error:
  22. Uncaught exception: TypeError: 'Myclass.logg' is not a function
  23.  
  24. Error thrown at line 41, column 2 in <anonymous function: window.onresize>(event) in http://portfolio.local/js/portfolioni.js:
  25.     Myclass.logg();
  26. */