How to count with jquery number of elements on remote page?
<p>I would like to count number of elements on remote page:
For example remote page:</p>

<p>test.html with following structure</p>

<pre><code>&lt;div id="Layout"&gt;
   &lt;div class="product"&gt;...&lt;/div&gt;
   &lt;div class="product"&gt;...&lt;/div&gt;
   &lt;div class="product"&gt;...&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Then I would like call from test2.html</p>

<pre><code>   &lt;script type="text/javascript"&gt;
        $(document).ready(function(){
           $('#result').load('/test.html #Layout product').length();
        });
    &lt;/script&gt;
</code></pre>

<p>This code is not working. What is the right way to do it?
Thank you.</p>
