Are there side effects to using string concatenation or jQuery inside jquery selectors?
<p>while exploring jQuery I came up with the following weird script. I don't see myself doing this really however concatenating strings to achieve a variable name is not unusual in JavaScript. </p>

<p>Any feedback welcome.</p>

<pre><code>...
    &lt;script type="text/javascript"&gt;
        var a = 'y';
        $(document).ready(function() {
            $('p[id^=' + $('p[id=x]').html() + a + "]").css('color','blue');
        });
    &lt;/script&gt;
...

&lt;p id="x"&gt;2a&lt;/p&gt;
&lt;p id="2ay_"&gt;mytext&lt;/p&gt;
</code></pre>
