jquery 'attribute contains' selector with a dynamic value
<p>Let's say that i have a variable <code>questionId</code> which is an integer, and i want to find <code>tr</code> elements that have the fragment (<code>"question_"+questionId</code>) in their id.  How can i do this?  I thought that i would be able to do it with the jquery <a href="http://api.jquery.com/attribute-contains-selector/" rel="nofollow">'attribute contains' selector</a>.  </p>

<p>Eg, this works, for a non-dynamic value,</p>

<pre><code>$("tr[id*='quiz_question_7674']")
</code></pre>

<p>but, i can't work out how to plug the variable value in there.  This doesn't work for example:</p>

<pre><code>questionId = 7674;
$("tr[id*='quiz_question_'+questionId]")
</code></pre>

<p>Any ideas anyone?  Is there a better way than 'attribute contains' to do it?  I have the feeling i'm missing something obvious.</p>

<p>thanks, max</p>

<p>EDIT - SOLVED. doh, i am indeed missing something obvious.  I keep forgetting that it's just a string, nothing more:</p>

<p>$("tr[id*='quiz_question_"+questionId+"']")</p>
