JQuery calculate shipping based on item details, only 2 possible choices, how would you go about it?
<p>I have 2 Shipping options,  </p>

<p>If the item is <strong>A5</strong> and is only 1 item then shipping price is <strong>£0.67p</strong><br>
If the item is <strong>A4</strong> and is only 1 item then shipping price is <strong>£0.87p</strong>  </p>

<p><strong>Otherwise the shipping price is £0.97p</strong>, (If more then 1, any size, any amount).</p>

<p>Now In my view I have the following table row with the selectors:</p>

<pre><code>&lt;table id="tbl_basket"&gt;
&lt;tr class="tbl_row"&gt;
    &lt;td&gt;Image&lt;/td&gt; &lt;!-- First Cell (Not required for example) --&gt;
    &lt;td class="tbl_basket_description"&gt;&lt;!-- Second Cell (Note: .size) --&gt;
        Print : &lt;span class="basket_item_specific type"&gt;Landscape&lt;/span&gt;&lt;br/&gt; 
        Size  : &lt;span class="basket_item_specific size"&gt;A4&lt;/span&gt;&lt;br/&gt;
        Colour: &lt;span class="basket_item_specific color"&gt;White&lt;/span&gt;&lt;br/&gt;
    &lt;/td&gt;

    &lt;td class="price_unit"&gt;1.99&lt;/td&gt;

    &lt;td align="center"&gt;
    &lt;input type="text" name="qty" value="1"/&gt;
    &lt;/td&gt;

    &lt;td class="total_item_price"&gt;1.99&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>I need to calculate which shipping price is required based on the above.<br>
I need some Jquery Code to say this:</p>

<pre><code>if (only 1 .tbl_row exists) // If only 1 row exists (How do I do this?)
{
     var size = $('.size').html();
     if(size == 'A5')
        $('.shipping_price').html('£0.67') // Show Shipping Price (A5)
     elseif(size == 'A4'){
        $('.shipping_price').html('£0.87') // Show Shipping Price (A4)
     }
}
else  // More then 1 row exists, so the price will be £0.97
{
    $('.shipping_price').html('£0.87') // Show Shipping Price (A4)
}
</code></pre>

<p>So basically, thats what I want to do, most of the logic is there, but how would I test to see if only 1 .tbl_row exists?</p>
