block function run when it is passed as parameter in javascript
<pre><code>var event = function(id) {
    alert(id);
}

textProgressBar.generator('20', text1, event("test"));

this.generator = function (percentage, text, event, type) {
    ....
    $(this.id).children().last().on('click', event);
}
</code></pre>

<p>I want to run function when it is clicked.
But it's function run when page is loaded.</p>

<pre><code>textProgressBar.generator('20', text1, event("test"));
</code></pre>

<p>If I pass the parameter to <code>event</code> function, it run when page is loaded.</p>

<p>How can I block this function when page is loaded?</p>