How to add a $ sign to $("#total").text(total); in jquery

What I want it once I get going through my form, ansering all my question and hit calculate, I want to be able to see the results as $1234 instead of just 1234. Is there a way to do that.

Also I might want to show it like this Your total cost is: $1234(based on submitted data) then a button like ADD to profile. Please help! Thank you in advance!

Script:

<script>function calculate() {
var total = (parseInt($('#studenttut option:selected').val()) + parseInt($('#campusrb>option:selected').val())) * parseInt($('#yearsatten>option:selected').val());
$("#total").text(total);
}
</script>

HTML:

<form>
<div id="1">
<table width="100%">
<tr>
    <td>Are you an In-State-Student?</td>
    <td align="right">
        <select id="studenttut">
            <option value="<?php echo $NIST; ?>">Yes $<?php echo $IST; ?></option>
            <option value="<?php echo $NOST; ?>">No $<?php echo $OST; ?></option>
        </select>
    </td>
</tr>
</table>
</div>

<div id="2">
<table width="100%">
<tr>
    <td>Are you staying on campus?</td>
    <td align="right">
        <select id="campusrb">
            <option value="<?php echo $NBS; ?>">Yes $<?php echo $BS; ?</option>
            <option value="1">No $0</option>
        </select>
    </td>
</tr>
</table>
</div>

<div id="3">
<table width="100%">
<tr>
    <td>How many years are you planning to attend?</td>
    <td align="right">
        <select id="yearsatten">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="2">3</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
        </select>
    </td>
</tr>
</table>
</div>

<div id="4">
<div id="total"><input type="button" onClick="calculate()" value="calculate"/></div>
</form>

</div>


ANSWERS:


This is just basic string concatenation:

$("#total").text("$" + total);

Just append the $ symbol to the total

var total = (parseInt($('#studenttut option:selected').val()) + parseInt($('#campusrb>option:selected').val())) * parseInt($('#yearsatten>option:selected').val());

var orginal ='$'+total;
$("#total").text(orginal);

You can try this:

<script>
   function calculate() {
     var total = '$' + ((parseInt($('#studenttut option:selected').val()) + parseInt($('#campusrb>option:selected').val())) * parseInt($('#yearsatten>option:selected').val()));
     $("#total").text(total);
   }
</script>

or more easy way:

$("#total").text('$' + total);


 MORE:


 ? convert a big number string to int
 ? How to convert a jQuery filter for use with waitForKeyElements?
 ? JavaScript onClick get input`s value and + 1, not as a string
 ? JSLint The Javascript debugger: Should I debug these issues?
 ? How to fix JSLint "missing new" error
 ? Using Javascript parseInt() and a Radix Parameter
 ? Examples for using radix parameter
 ? jslint: Closing bracket after var statement
 ? jslint: Closing bracket after var statement
 ? jslint: Closing bracket after var statement