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.Hide element from DOM in jQuery<p>Share your html and javascript code.</p>https://www.aspforums.net:443/Threads/172722/Hide-element-from-DOM-in-jQuery/https://www.aspforums.net:443/Threads/172722/Hide-element-from-DOM-in-jQuery/Mon, 22 Jul 2019 00:56:20 GMTHide element from DOM in jQuery<p>Hi <a class="username" rel="bhadriau"> bhadriau</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;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 () { if ($(&#34;#lblCommercial&#34;).text() == &#39;Commercial&#39;) { $(&#34;#lblCommercial&#34;).closest(&#39;label&#39;).hide(); } }); &lt;/script&gt; &lt;label&gt;&lt;input type=&#34;radio&#34; id=&#34;chkCommercial&#34; /&gt;&lt;span id=&#34;lblCommercial&#34;&gt;Commercial&lt;/span&gt;&lt;/label&gt; &lt;br /&gt; &lt;label&gt;&lt;input type=&#34;radio&#34; id=&#34;chkGovernment&#34; /&gt;&lt;span id=&#34;lblGovernment&#34;&gt;Government&lt;/span&gt;&lt;/label&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/172722/Hide-element-from-DOM-in-jQuery/https://www.aspforums.net:443/Threads/172722/Hide-element-from-DOM-in-jQuery/Mon, 22 Jul 2019 04:35:53 GMT