title: JQuery SlideUp - Background Color Behind Image
body: <p>I am using JQuery slideUp/slideDown to add an overlay to an image that is hidden until mouseover and then slides up from the bottom of the image. </p>
  
  <p>The div that is sliding up is given a background color, but it doesn't show up over the image, it shows up behind it (the text shows up on top of the image, but I can just see the bottom edge of the div's background color because of the margins I set). Z-index is already set to 100.</p>
  
  <p>Any ideas? Thanks!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>(function($) {
    $(document).ready(function() {
  
  $(".slider").attr("style", "display: none;");
  
  if ($(".slider")) {
    $('.image').mouseover(function() {
      $(this).find(".slider").slideDown("400");
    }).mouseout(function() {
      $(this).find(".slider").slideUp("400");
    });
  }
      
    });
  }(jQuery));</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.image{
    height: 300px;
    width: 300px;
    background: #000000;
  }
  .slider {
    background-color: #333333 !important;
    background: #333333 !important;
    background-position: 0% 100%;
    color: #ffffff;
    margin: -90px 0 0 0;
    height: 90px;
    width: 100%;
    z-index: 100 !important;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="container"&gt;
    &lt;div class="image"&gt;
  
    &lt;/div&gt;
  
    &lt;div class="slider"&gt;
      &lt;div class="title"&gt;Title&lt;/div&gt;
      &lt;div class="text"&gt;Text&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>