Get an ID on page load in jquery script
<p>I have a PHP while loop where I am generating #id dynamically. </p>

<p>Example : </p>

<pre><code>&lt;?php 
$i=1;
while ($row = mysqli_fetch_array($result)): 
?&gt;

&lt;tr&gt;
&lt;td class='hashtag' id='status&lt;?php echo $i; ?&gt;'&gt;status value&lt;/td&gt;
&lt;/tr&gt;

&lt;?php 
$i++;
endwhile: 
?&gt;
</code></pre>

<p>The status id are generating like this : status1, status2, status3 etc...</p>

<p>I want all these Id's in my JS code ON LOAD for displaying it into the modal dialog.</p>

<p>Example :</p>

<pre><code>&lt;script type="text/javascript"&gt;

$(document).ready(function(){

$("#status1");
$("#status2");
$("#status3");
.
.
and so on as per the php while loop.

});
&lt;/script&gt;
</code></pre>

<p>How can I achieve this?</p>
