attach 2 functions in form with jquery
<p>I  have this html form</p>

<pre><code>&lt;form action="upload/" id="upload" name="upload"&gt;
// other form data
&lt;/form&gt;
</code></pre>

<p>and this in html on page where i can switch form attributes</p>

<pre><code>&lt;a href="#" id="startDownload"&gt;Download&lt;/a&gt;
&lt;a href="#" id="startUpload"&gt;Upload&lt;/a&gt;
</code></pre>

<p>and my javascript</p>

<pre><code>$("#startUpload").click(function( {
    $("form").attr('action','upload/').attr('id','upload');
});

$("#startDownload").click(function( {
    $("form").attr('action','download/').attr('id','download');
});

$(function() {
    $('#upload').uploadThis({
        // other code here
    });
$(function() {
    $('#download').downloadThis({
        // other code here
    });
</code></pre>

<p>my problem is when i click on href #startUpload this is attached with $('#upload').uploadThis({}) function and it works but when i click on #startDownload it is not attaching this $('#upload').downloadThis({}) function and not getting called.  </p>

<p>thanks for any help.</p>
