Fixed clickToClose (was broken previously) + new param onClick : function

Hi,

So the previous commit broke the clickToClose functionality. This commit fixes that and adds another parameter that might be useful: onClick : function.

I find the onClick useful when additional actions are required on click.