title: Hide parent div of child with class
body: <p>Looking for some help with something that is probably not that difficult if you know how. Unfortunately though, I'm completely new to <code>jQuery/JavaScript</code> and I have no idea how to do this, so if someone could point me in the right direction, that would be great!</p>
  
  <p>I'm working on a Joomla website with a 3rd party Google Maps component. Cool component, but there's 1 particular label I want to hide. Normally I'd simply hide this element with CSS, but since this particular div doesn't have any "ID" or "Class" I can't directly target it with CSS, i think.</p>
  
  <p>I noticed the child of the div I'm trying to hide, does have a unique class, so I'm looking for a solution where by using the child's class-name, I can hide it's parent.</p>
  
  <p>I figured something like this would do the trick:</p>
  
  <pre><code>$('.gm-style-iw').parent().hide();
  </code></pre>
  
  <p>However, with my limited knowledge I struggle and I'm not sure if it's related to the jQuery code I'm using, or because I'm simply putting it in the wrong place or something else I'm doing wrong...
  (Keep getting "</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'parent' of null</p>
  </blockquote>
  
  <p>")</p>
  
  <p>Bit of background. This is more or less how the particular part of the code looks like;</p>
  
  <pre><code>&lt;div style="cursor: default; position: absolute; left: 234px; top: 86px; z-index: 86;"&gt;
      &lt;div class="gm-style-iw" style="top: 9px; position: absolute;"&gt;
  </code></pre>
  
  <p>I'm looking for a way to hide the 'div' above 'div class="gm-style-iw" '</p>
  
  <p>Here's a live example of the Google Maps component.
  <a href="http://83.84.140.23:8888/joomla/index.php/contact" rel="nofollow">http://83.84.140.23:8888/joomla/index.php/contact</a></p>
  
  <p>I'm basically trying to hide the 'text balloon' that states "Gabbon" on opening the page... (In the map at the bottom)</p>
  
  <p>Anyone could point me in the right direction on how to hide this?</p>
  
  <p>Many thanks in advance!</p>