Skip to content

Instantly share code, notes, and snippets.

@littlefoxhelper
Forked from mpakus/gist:2585435
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save littlefoxhelper/b1c6c464e4f38b825acd to your computer and use it in GitHub Desktop.

Select an option

Save littlefoxhelper/b1c6c464e4f38b825acd to your computer and use it in GitHub Desktop.

Revisions

  1. @mpakus mpakus revised this gist May 3, 2012. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -23,15 +23,12 @@
    $(document).ready(function () {
    M = $(".menu");
    M.css( {left: $('body').width()/2 - 300 + "px"} );
    $(".menu").toggle(
    M.toggle(
    function() {
    console.log('start');
    M.animate( {top:"0px"} );
    mo = 1;
    },
    function() {
    M.animate( {top:"-180px"} );
    mo = 0;
    }
    );
    });
  2. @mpakus mpakus revised this gist May 3, 2012. 1 changed file with 2 additions and 8 deletions.
    10 changes: 2 additions & 8 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,8 @@
    margin:0;
    padding:0;
    }
    .container{
    position: absolute;
    text-align: center;
    }
    .menu{
    position: relative;
    position: absolute;
    width: 600px;
    height: 180px;
    background: gray;
    @@ -44,8 +40,6 @@
    </head>

    <body>
    <div class="container">
    <div class="menu"></div>
    </div>
    <div class="menu"></div>
    </bodY>
    </html>
  3. @mpakus mpakus revised this gist May 3, 2012. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,10 @@
    <script type="text/javascript" src="jquery-1.7.2.min.js"></script>

    <style type="text/css">
    body{
    margin:0;
    padding:0;
    }
    .container{
    position: absolute;
    text-align: center;
    @@ -22,6 +26,7 @@

    $(document).ready(function () {
    M = $(".menu");
    M.css( {left: $('body').width()/2 - 300 + "px"} );
    $(".menu").toggle(
    function() {
    console.log('start');
  4. @mpakus mpakus created this gist May 3, 2012.
    46 changes: 46 additions & 0 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    <html>

    <head>
    <script type="text/javascript" src="jquery-1.7.2.min.js"></script>

    <style type="text/css">
    .container{
    position: absolute;
    text-align: center;
    }
    .menu{
    position: relative;
    width: 600px;
    height: 180px;
    background: gray;
    top: -180px;
    border-bottom: 10px solid red;
    }
    </style>

    <script type="text/javascript">

    $(document).ready(function () {
    M = $(".menu");
    $(".menu").toggle(
    function() {
    console.log('start');
    M.animate( {top:"0px"} );
    mo = 1;
    },
    function() {
    M.animate( {top:"-180px"} );
    mo = 0;
    }
    );
    });

    </script>
    </head>

    <body>
    <div class="container">
    <div class="menu"></div>
    </div>
    </bodY>
    </html>