Sha256: 9f006b65df48f7916b8634345c93c112f914594177bb12ae7dd8b6e9180d87d8

Contents?: true

Size: 676 Bytes

Versions: 4

Compression:

Stored size: 676 Bytes

Contents

document.addEventListener("DOMContentLoaded", function (event) {

  /*
   * Display the menu items on smaller screens
   */
  var pull = document.getElementById('pull');
  var menu = document.querySelector('nav ul');


  ['click', 'touch'].forEach(function (e) {
    pull.addEventListener(e, function () {
      menu.classList.toggle('hide')
    }, false);
  });

  /*
   * Make the header images move on scroll
   */
  window.addEventListener('scroll', function () {
    var offset = -(window.scrollY || window.pageYOffset || document.body.scrollTop) / 3;
    document.getElementById("main").style.backgroundPosition = '100% ' + offset + 'px' + ', 0%, center top';
  });
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
type-on-strap-2.2.5 assets/js/partials/navbar.js
type-on-strap-2.2.4 assets/js/partials/navbar.js
type-on-strap-2.2.1 assets/js/partials/navbar.js
type-on-strap-2.1.2 assets/js/partials/navbar.js