DocumentJS.types.prototype  class     

Sets the following functions and attributes to be added to Class or Constructor prototype (instance) functions.

Example

$.Controller.extend('Cookbook.Controllers.Recipe',
/* @Static */
{
   onDocument: true
},
/* @Prototype */
{
 /**
  * When the page loads, gets all recipes to be displayed.
  */
  load: function(){
     if(!$("#recipe").length) 
         $(document.body).append($('<div/>').attr('id','recipe'))
     Cookbook.Models.Recipe.findAll({}, this.callback('list'));
   },
   ...
© Jupiter IT - JavaScriptMVC Training and Support