brokenfingers/Fabric_Manager

View on GitHub
app/assets/javascripts/menu.js

Summary

Maintainability
A
2 hrs
Test Coverage
var main = function() {
  /* Push the body and the nav over by 285px over */
  $('.icon-menu').click(function() {
    $('.menu').animate({
      left: "0px"
    }, 200);

    $('.user_show').animate({
      left: "285px"
    }, 200);
  });

  /* Then push them back */
  $('.icon-close').click(function() {
    $('.menu').animate({
      left: "-285px"
    }, 200);

    $('.user_show').animate({
      left: "0px"
    }, 200);
  });
};


$(document).ready(main);