title: Android Style Drag Resizable Menu
body: <p>Fiddle (Along with snippet at bottom of post): <a href="http://jsfiddle.net/6pp0Lg6v/8/" rel="nofollow noreferrer">http://jsfiddle.net/6pp0Lg6v/8/</a></p>
  
  <p>On iOS you can drag to reveal a menu from the top to view your notifications. You can do the same on Android as well. </p>
  
  <p>I'm working on a web designer where I'll be using this type of effect and I been trying to do this in jQuery and am having trouble getting it to only change the element's size (that'd be .reveal). </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('strong').click(function() {
    $('.reveal').animate({ 'height': 'toggle' }, 100)
  });
  
  // Handles FunctionBar
  $(".functionbar").draggable({
    axis: "y",
    handle: ".handlesbar",
    disabled: false
  });
  
  $(".revealbar").draggable({
    axis: "y",
    //containment: "parent",
    helper: "clone",
    drag: function (event, ui) { 
      var height = ui.offset.top; 
      $(this).prev().height(height); 
      $(".revealbar.ui-draggable-dragging").addClass("hide").css({
        "height": "0",
        "overflow": "hidden"
      });
    }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background:  #aaa;
  }
  
  /* FunctionBar */
  .functionbar {
    overflow: hidden;
  }
  
  .handlesbar {
    margin: auto;
    width: 90%;
    padding: 6px 0;
    border-radius: 10px 10px 0 0;
    font: 24px arial;
    text-align: center;
    background: hsla(180, 0%, 0%, .75);
    word-spacing: 12px;
  }
  
  a {
    text-decoration: none;
    color: hsl(180, 0%, 90%);
  }
  
  .active {
    color: #9cf;
  }
  
  .hide {
    display: none;
  }
  
  /* Drag to Reveal Elements */
  .reveal {
    margin: auto;
    width: 90%;
    background: #fff;
    overflow: visible!important;
    display:none;
  }
  .reveal, .revealcontent {
    z-index: 0;
    overflow: auto;
  }
  .revealbar {
    cursor: default;
    text-align: center;
    background: #666;
    color: #1c1c1c;
    z-index: 1;
    overflow: hidden;
  }
  .reveal h1 {
    margin: 0;
    padding: 16px 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Android Style Drag Menu Reveal/Hide&lt;/title&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="initial-scale=1.0"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=9" /&gt;
      &lt;link type="text/css" rel="stylesheet" href="http://necolas.github.io/normalize.css/3.0.1/normalize.css"/&gt;
      &lt;link type="text/css" rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css"/&gt;
      &lt;link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css" /&gt;
      &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;!-- FunctionBar --&gt;
      &lt;div class="functionbar"&gt;
        &lt;div class="handlesbar"&gt;
          &lt;div class="handlesbar-page1"&gt;
            &lt;a id="addelement" title="Add Element" href="javascript:void(0)"&gt;
              &lt;span class="fa fa-plus"&gt;&lt;/span&gt;
            &lt;/a&gt; 
            &lt;a id="styleelement" title="Style Element" href="javascript:void(0)"&gt;
              &lt;span class="fa fa-magic"&gt;&lt;/span&gt;
            &lt;/a&gt; 
            &lt;a id="moresettings" title="More Settings" href="javascript:void(0)"&gt;
              &lt;strong&gt;...&lt;/strong&gt;
            &lt;/a&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class="reveal"&gt;
          &lt;div class="revealcontent"&gt;
            &lt;div class="stylescontent"&gt;
              Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="revealbar"&gt;
            &lt;span class="fa fa-bars"&gt;&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>