JQueryPorletWithSettings is a project mainly written in JavaScript, it's free.
Example of a JQuery Portlet that allows you to close portlets, show them again, and change column widths
This quick example shows how to setup JQuery Portlets with some features that I found hard to find.
Download the files.
This is a pure html/javascript application. You view it with a browser from either your file system, or from a web server.
Your free to do whatever you want with this source.