How to select a tag with a variable value in jQuery
<p>I am very new to jquery/javscript.
I have a simple question.</p>

<p>Lets say i have a tag like this:</p>

<pre><code>&lt;Table id="mytable" &gt;
&lt;Table&gt;
</code></pre>

<p>And i want to add some rows to this table.</p>

<p>Then we do like:</p>

<pre><code>$("#mytable").append("&lt;tr&gt;&lt;td&gt;value&lt;/td&gt;&lt;/tr&gt;");
      //some thing like this may not be having the right syntax
</code></pre>

<p>Now my question is lets the id of the table is in a variable for example:</p>

<pre><code>var table="mytable"; //which is coming from the back end
</code></pre>

<p>Now my using the "table" variable how can I append the row..?</p>

<p>Is that going to be </p>

<pre><code>$("#"+table).append("&lt;tr&gt;&lt;td&gt;value&lt;/td&gt;&lt;/tr&gt;");//
</code></pre>

<p>Can some one help me out in this simple thing?
Thanks,
Swati</p>
