jQuery: if an HTML element is not loaded, modify another one
<p>I looked around and can't find anything similar to what I need help with.</p>

<p>--</p>

<p>I have two DIVs, floated to the left so they appear next to each other. In the left one I have the product image, and in the right one, the product description/information.</p>

<p>Sometimes, the product image will not appear in the page, that's because the product manager (there are many of them in the company I work at) may not have a picture of the product, hence, they won't upload a picture in the CMS, thus, in the product page only the description/information will appear.</p>

<p><strong>What I need</strong></p>

<p>What I need is a way to detect if the DIV of the product image has been injected in the page or not.</p>

<p>If it has, no problem, both containers maintain their widths. But if the DIV of the product image is not present on the page, then I need to modify the width of the DIV of the product description to be wider (otherwise, it will maintain its width and there will be unused space to its right).</p>

<p>Does that make sense?</p>

<p>Here's the basic code:</p>

<p><strong>HTML:</strong></p>

<pre><code>&lt;div id="product-wrapper"&gt;Product image&lt;/div&gt;
&lt;div id="product-description"&gt;Product description/information&lt;/div&gt;
</code></pre>

<p><strong>CSS:</strong></p>

<pre><code>#product-wrapper { float:left; width:200px; }
#product-description { float:left; width:400px; }
</code></pre>

<p>Thanks!</p>
