How to assign jquery to TempData in mvc?
<p>I want when <code>click</code> on the <code>button</code> put a value into temdata .I use this code but after page  load  I check inspector and found that this function don't assigned to the button. I think that when browser load this code get error.How to fix this?</p>

<pre><code>$('#Continue').click(function (e) {
    if (!$('#SweepFlight').is(':checked')) {
        //e.preventDefault();
        validateDeparturef(e);
    }//if !checked
    //---------------------------------------------------------------------------------------
    if ($('#SweepFlight').is(':checked')) {
       // e.preventDefault();
        validateDeparturef(e);
        validateArrivalf(e);
    }//if checked

    @TempData["DepAvailClassCode"] = $('#Departuref article.show + div.detailFlight div.btn.backGreen').val();
    @TempData["ArrAvailClassCode"] = $('#Arrivalf article.show + div.detailFlight div.btn.backGreen').val();

});//click
</code></pre>