jQuery ie8 attr poor performance
<p>"I have some html similar to below contained within a loop where the parent id is dynamically generated,</p>

<pre><code>&lt;t:loop&gt;
    &lt;div id="demoid-10132165498794631" class="lineItem-container"&gt;
        &lt;div&gt;
            &lt;select/&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/t:loop&gt;
</code></pre>

<p>I'm trying to get the id of the parent element containing class lineItem-container. </p>

<p>I'm using the following script to get the id, </p>

<pre><code>var id = $("select").parents(".lineItem-container").attr("id").substring(6);
</code></pre>

<p>The html can potentially be looped up to 1000 times which causes very poor performance in ie8. My assumption is the performance issue is caused by the attr selector. </p>

<p>JS Log from IE8</p>

<pre><code>Function    Count   Inclusive Time (ms) Inclusive Time %    Exclusive Time (ms) Exclusive Time %    Avg Time (ms)   Max Time (ms)   Min Time (ms)

attr    431,334 21,609.38   12.65   14,406.25   8.43    0.05    2,234.38    0
attr    431,382 20,265.63   11.86   12,203.13   7.14    0.05    31.25   0
ATTR    239,906 20,531.25   12.02   9,125.00    5.34    0.09    8,156.25    0
attr    241,475 11,531.25   6.75    7,312.50    4.28    0.05    31.25   0
</code></pre>

<p>Does anybody have any suggestions on how to potentially speed this process up?</p>
