Let's document the ImageCaption plugin with the standard MooTools More plugin documentation block comment (sometimes abbreviated as docblock comments).
Open
ImageCaption.js
in your source code editor.At the very top of the file, insert the following docblock comment.
Script: … … License: Authors: */ var ImageCaption = new Class({ Implements: [Options], options: { wrapperClass: 'imageCaption', wrapperType: 'span', captionType: 'span', captionPosition: 'after' }, ...
Finally, fill in the information. This is where our design sheet comes in handy for the description of the script; we can simply take what we wrote down in the "What it will do" column of the design sheet we developed, and modify it as necessary. Use tab spaces to indent the docblock comment items.
Script: ImageCaption.js Takes the alt property (or title property) of an image, and insert it as HTML text to serve as a photo caption (its description). License: MIT-style license...