Getting a Syntax/Parse error when using jQuery in Velocity
<pre><code>&lt;script type="text/javascript&gt;
(function($, win) {
function mySettingsInitJS () {  

    var self = this;
    var opts = {
        'params' : "userId=" + userId;
    }; 
    self.init = function() {
        self.initUnlinkAction();
    };
    self.initbtnAction = function() {
        $('#Btn').click(self.btnAction);
    };

    self.btnAction = function(e) {
        if(e) { e.preventDefault(); }
        jQuery.post(
        'http://abc/rest/PostRequest', 
        opts.params, function(data) {
        alert('This worked!');
        }, "json");                         
    };

}
function win.MyFilesSettingsInitJS = new MyFilesSettingsInitJS();
}(jQuery, window));
&lt;/script&gt;
</code></pre>

<p>I have this this script in a velocity template page and a Btn also in it. Which is basically a fancy Link. I am also sure the rest API on the server side is working fine. But somehow my java script function is not called. Could some one please help me ? </p>
