Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Scroll Hide Testing</title>
</head>
<body>
  <label class="hamburger" for="sidebarToggler" id="menuToggle">
    <input type="checkbox" id="sidebarToggler" name="sidebar" value="">
  </label>
  <script src="https://code.jquery.com/jquery-2.1.4.js"></script>
  <script>
      $(function(){
          $("#menuToggle").click(function () {
              // Toggle your class whenever this is clicked
              $(this).toggleClass('close-menu');
              // Notice that you don't need the leading '.' when using the hasClass
              // function
              $('body').toggleClass('hide-scroll',$(this).hasClass('close-menu'));
          });
      });
  </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
rionmonsterpro
0viewers