Settings Selector Dynamically in JQuery
<p>I have a table whose values are being generated dynamically with PHP, including the id and name attributes (e.g. id="question_".</p>

<p>How can I set an element attribute with this in mind? For example, I have a div whose text will change after a successful ajax call, but the id is dynamic. </p>

<p>I have tried making the following test function, and calling it on an onclick event:</p>

<pre><code>function approve(question_id)
{
    var div = 'suggestion_status_' + question_id;
    $('#div').html('test');
}
</code></pre>

<p>But that does not work.  How can make the value of variable 'div' the selector?</p>
