ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Using variable in place of class or id name in jQueryHi @Sadakat,<br />Please try the following<br /><br /><a href = 'link(Threads/820872/How-to-use-single-click-event-handler-for-multiple-link-buttons-by-same-class-name-Using-jQuery/)'>How to use single click event handler for multiple link buttons by same class name Using jQuery</a><br /><br />It might help you.<br /><br />Cheers Andrea.https://www.aspforums.net:443/Threads/180367/Using-variable-in-place-of-class-or-id-name-in-jQuery/https://www.aspforums.net:443/Threads/180367/Using-variable-in-place-of-class-or-id-name-in-jQuery/Sun, 16 Jun 2019 07:43:11 GMTUsing variable in place of class or id name in jQuery<p>No Sir It did'nt<br />my requirement is to use variable in place of id in a loop</p>https://www.aspforums.net:443/Threads/180367/Using-variable-in-place-of-class-or-id-name-in-jQuery/https://www.aspforums.net:443/Threads/180367/Using-variable-in-place-of-class-or-id-name-in-jQuery/Sun, 16 Jun 2019 07:53:08 GMTUsing variable in place of class or id name in jQuery<p>Hi <a class="username" rel="Sadakat"> Sadakat</a>,</p> <p>Refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <div class="demo_block"> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(function () { var train = [{ ClassCode: &#34;Train 1&#34; }, { ClassCode: &#34;Train 2&#34;}]; var ddlclass = $(&#34;#ddlclass&#34;); for (var j = 0; j &lt; train.length; j++) { var cls = $(&#34;&lt;option value=&#39;&#34; + j + &#34;&#39;&gt;&#34; + train[j].ClassCode + &#34;&lt;/option&gt;&#34;); $(ddlclass).append(cls); } }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;select id=&#34;ddlclass&#34;&gt; &lt;/select&gt; &lt;/body&gt; &lt;/html&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/180367/Using-variable-in-place-of-class-or-id-name-in-jQuery/https://www.aspforums.net:443/Threads/180367/Using-variable-in-place-of-class-or-id-name-in-jQuery/Mon, 17 Jun 2019 00:08:07 GMT