parameter function in jquery
<p>i want to make function with parameter. i working with below code but it is not working. can anyone tell me what am i doing wrong.</p>

<pre><code>&lt;head&gt;
    &lt;script type="text/javascript" src="jquery-1.7.2.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $(function hide(fn){
            $(fn).click(function(){
                $('div').hide()
            })
        })
    &lt;/script&gt;
    &lt;style&gt;
        div { width:500px; height:500px; background:#FF0000; }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;button onclick="hide(this)"&gt;click for hide&lt;/button&gt;
    &lt;a href="#"&gt;click&lt;/a&gt;
    &lt;button&gt;click&lt;/button&gt;
    &lt;div&gt;&lt;/div&gt;
&lt;/body&gt;
</code></pre>
