Sha256: d81823866a232e3466d1cb6fad7bbcd725da0ee2f0f3509ffef9b97bbcffb00e

Contents?: true

Size: 454 Bytes

Versions: 1

Compression:

Stored size: 454 Bytes

Contents

(function(document) {
  var toggle = document.querySelector('.sidebar-toggle');
  var sidebar = document.querySelector('#sidebar');
  var checkbox = document.querySelector('#sidebar-checkbox');

  document.addEventListener('click', function(e) {
    var target = e.target;

    if(!checkbox.checked ||
       sidebar.contains(target) ||
       (target === checkbox || target === toggle)) return;

    checkbox.checked = false;
  }, false);
})(document);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ockham-0.1.0 assets/js/ockham.js