Sha256: e3f9070cfb385fdecbba430a5549f579d8eaff3bd6ae1ae6e6cd6e063c2c9ef4

Contents?: true

Size: 578 Bytes

Versions: 3

Compression:

Stored size: 578 Bytes

Contents

;(function() {
  var $forms = document.querySelectorAll(".style-guide-partial form");
  var $links = document.querySelectorAll(".style-guide-partial [href]");
  var $sources = document.querySelectorAll(".style-guide-partial-source");

  function eventDefaultPreventer(event) {
    event.preventDefault();
  }

  function preventDefaultOnClick(elements) {
    for (var i = 0, element; element = elements[i]; i++) {
      element.onclick = eventDefaultPreventer;
    }
  }

  preventDefaultOnClick($forms);
  preventDefaultOnClick($links);
  preventDefaultOnClick($sources);
})();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
style-guide-1.1.0 app/assets/javascripts/style_guide/partial.js
style-guide-1.0.0 app/assets/javascripts/style_guide/partial.js
style-guide-0.7.4 app/assets/javascripts/style_guide/partial.js