jQuery hide the divs based on the classes getting from server <p>I have 3 <code>div</code> blocks. Based on the response getting from my AJAX request, I want to show or hide the specific block. Suppose I have gotten the response in JSON format like this:</p> <pre><code>var response = [{ "class":[ "firstBlock", "secondBlock" ] }] </code></pre> <pre class="lang-js prettyprint-override"><code>&lt;div class="mianBlock"&gt; &lt;div class="firstBlock"&gt; div content goes here &lt;/div&gt; &lt;div class="secondBlock"&gt; div content goes here &lt;/div&gt; &lt;div class="thirdBlock"&gt; div content goes here &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Using jQuery, how do I hide the 2 blocks?</p>