The aim of collection.js is to provide the minimum javascript code to handle the form collection of symfony. I strongly advise you to do it yourself at least once by following the cookbook.
This work relies on jQuery.
This repository only aims at presenting collection.js. There are two examples.
simple.html is an example of were you should use collection.js. With no extra code you get a working form collection based on your symfony template.
complex.html is not necessarily a case were you should use collection.js. As there are lot of specific behaviors, there is no real need for an external part. However it exists to present how you can add your specific behaviors on top of collection.js.
To try it on your computer please read this. For more information please read the doc.