I recommend using some standard way to document javascript code, like the answer to this question used: http://stackoverflow.com/questions/669698/what-options-are-available-for-documenting-your-javascript-code