clearly length is important - javascript length issue
<p>I am trying to show a div if the length of a string from a db call is not 0</p>

<p>So, to test, I'm trying:</p>

<pre><code>html += '&lt;div class="item_image"&gt; price '+image.item_price;
</code></pre>

<p>Which will print within div item_image something like:</p>

<pre><code>price $10
</code></pre>

<p>So, to show a div I want to because the price field is not empty I'm trying:</p>

<pre><code>if(image.item_price.length&gt;0){ // price
        html += '&lt;div class="price_holder"&gt;'+image.item_price+'&lt;/div&gt;';
        } // price
</code></pre>

<p>But it does not show the div, it's as if it's is not reading the length correctly, is there a better way to do this?</p>
