title: How to get nodeName of grandchildren in div
body: <p>I am trying to trigger a click event on any ( A tag ) to go to the HREF url specified, it works for parent elements but doesn't work for grand children in under the (cmpsocials) class.</p>
  
  <p>Please let me know where i am going wrong.</p>
  
  <pre><code>&lt;li class="grid-item" style="cursor:pointer;"&gt;
    &lt;div class="elisting-b bus-border"&gt;
  
      &lt;div class="elisting-logo"&gt;
          &lt;a class="userlink" href="https://website.com/listing/discountpi"&gt;
                                      &lt;img width="307" height="104" src="https://website.com/wp-content/uploads/2018/06/discount-power-inc-logo.png" class="attachment-full size-full" alt="" srcset="https://website.com/wp-content/uploads/2018/06/discount-power-inc-logo.png 307w, https://website.com/wp-content/uploads/2018/06/discount-power-inc-logo-300x102.png 300w" sizes="(max-width: 307px) 100vw, 307px"&gt;&lt;/a&gt;            &lt;/div&gt;
      &lt;div class="list-right"&gt;
          &lt;div class="companyaddress"&gt;
              &lt;h2 class="el-cname"&gt;&lt;a class="userlink" href="https://website.com/listing/discountpi"&gt;Discount Power Inc.&lt;/a&gt;&lt;/h2&gt;
              &lt;div class="cphone"&gt;
                  &lt;div class="phn-icon"&gt;
                      &lt;a href="tel:(203) 929-3200"&gt;(203) 929-3200&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="acdd"&gt;6 Armstrong Road, Shelton, NJ 6484, USA
              &lt;/div&gt;
  
  
              &lt;a class="weblink" href="https://website.com/" target="_blank"&gt;https://website.com/&lt;/a&gt;
              &lt;div class="cmpsocials"&gt;
                  &lt;ul&gt;
                      &lt;li&gt;&lt;a href="https://www.facebook.com/website" target="_blank"&gt;&lt;img src="https://website.com/wp-content/themes/jobify/images/facebook-icon.png" alt="facebook"&gt;&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="https://twitter.com/website" target="_blank"&gt;&lt;img src="https://website.com/wp-content/themes/jobify/images/twitter-icon.png" alt="facebook"&gt;&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="https://www.linkedin.com/website" target="_blank"&gt;&lt;img src="https://website.com/wp-content/themes/jobify/images/linkedin-icon.png" alt="facebook"&gt;&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="https://www.youtube.com/website" target="_blank"&gt;&lt;img src="https://website.com/wp-content/themes/jobify/images/youtube-icon.png" alt="facebook"&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
  
              &lt;/div&gt;
  
          &lt;/div&gt;
  
          &lt;div class="two-btn-listing"&gt;
              &lt;!--&lt;div class="cmpny-contact"&gt;&lt;a href="&lt;? //get_author_posts_url($user-&gt;ID, $author_nicename);  ?&gt;"&gt;View Listing&lt;/a&gt;&lt;/div&gt;--&gt;
              &lt;div class="sendmsg elisting-btn" auth-id="JGlassman@website.com"&gt;&lt;a href="javascript:void(0)"&gt;Send a Message&lt;/a&gt;&lt;/div&gt;
  
              &lt;div class="search-sp"&gt;
                  &lt;h4&gt;Energy Supply And Distribution&lt;/h4&gt;
                  &lt;span&gt;energy suppliers&lt;/span&gt; &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p></li></p>
  
  <pre><code>jQuery(".grid-item").click(function(e){
  
      if(child[i].nodeName != "A"){
          window.location=jQuery(this).find("a.userlink").attr("href"); 
          return false;
      }
  
  });
  </code></pre>