Download file by Jquery
<p>i search google and got a code snippet for downloading file by jquery. the syntax is like below</p>

<pre><code>var downloadURL = function(url)
{
    var iframe;
    iframe = document.getElementById("hiddenDownloader");
    if (iframe === null)
    {
        iframe = document.createElement('iframe');  
        iframe.id = "hiddenDownloader";
        iframe.style.visibility = 'hidden';
        document.body.appendChild(iframe);
    }
    iframe.src = url;   
}
</code></pre>

<p>but could not understand how it works. how call it and how to pass url. so please help me to use the above function and tell me how to pass url as argument. please also tell me what type of code is the above it is not a function.</p>

<pre><code>var downloadURL = function(url)
</code></pre>

<p>how it works. variable name equal to function name. a function can be called but the above code snippet can not be called. so please discuss in detail. thanks.</p>
