Sha256: 2096857c11d4970e80c5234bf1caf7c10915fc66c54225e31ddca044bee0795a
Contents?: true
Size: 495 Bytes
Versions: 2
Compression:
Stored size: 495 Bytes
Contents
function each(elems, func) { if (!elems instanceof Array) { elems = [elems]; } for (var i = elems.length; i--; ) { func(elems[i]); } } function onClick(elems, func) { each(elems, function(elem) { elem.onclick = func; }); } function setupMigrations() { var elems = document.querySelectorAll(".pt_migration .pt_header"); onClick(elems, function() { var content = this.nextElementSibling; content.style.display = content.style.display === "" ? "block" : ""; }); }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ponytail-0.0.2 | app/assets/javascripts/ponytail/migrations.js |
ponytail-0.0.1 | app/assets/javascripts/ponytail/migrations.js |