Simple calculation data in dynamic fields

Simple calculation data in dynamic fields

I try create online calculator with different dynamic fields and make online calculation which will depends on changing fields.

Now I've got the problem how to calculate the price for one item.


I've got section with select, where we can choose quantity

<select id="selectId">
    <option>Select option</option>
    <option>2 item</option>
    <option>3  item</option>
    <option>4 item</option>

Also I've got dynamic field with price where we put summary data which depends on a lot of conditions
<span style="display: inline;">
    <span id="euro">20 rub | </span>
    <span id="usd">30 usd | </span>
</span >

I create the section where I try calculate the price for 1 item with id #item, below the script
<script type="text/javascript">
                            $(document).ready(function() {
                            $("#selectId").change(function() {
                                var a= parseInt($("#selectId option:selected"));
                                var b= parseInt($("#usd"));
                                var c=a/b;



as a result I've got the mistake NaN
Please help me to solve the problem. Thank you.