how to get grand total dynamically using jquery
<p>I have dropdown of nationality with its related price for rooms of hotel.Now I want to dynamically add the prices shown and output it.</p>

<pre><code>&lt;div class="Total"&gt;&lt;/div&gt;
&lt;div class="rum_name"&gt;Room name&lt;/div&gt;
&lt;div class="nationality"&gt;
&lt;select class="sel_nationality" name="nationality"&gt;
&lt;option roomprice="30" value="63"&gt;SAARC&lt;/option&gt;
&lt;option roomprice="50" selected="selected" value="65"&gt;American/ European&lt;/option&gt;
&lt;option roomprice="45" value="67"&gt;Japnese/ Korean&lt;/option&gt;
&lt;option roomprice="38" value="69"&gt;All Others&lt;/option&gt;
&lt;/select&gt;
&lt;div class="Price"&gt;
Price:
&lt;span class="selectedPrice"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    $(document).ready(function(){
        var total = 0;
        $('.sel_nationality').change(function(){
            $price = $('option:selected', this).attr('roomprice');
            $parent = $(this).parents('.nationality');
            $parent.find('span.selectedPrice').text($price);
            $tot_price = $(this).val();
            $(this).each(function(){
                total += parseInt(this.value);
            })
           $('.Total').text(total); 
        })
           })
&lt;/script&gt;
</code></pre>

<p>There may be more than 1 rooms and the above option for each.Now I want to dynamically change the total as perthe price outputted.
Thanks</p>
