~dricottone/blog

a1ab65abeebe4122cc3948541221f26ba16e5207 — Dominic Ricottone 2 years ago 20a724c
Slight refactor

I'm trying to replace `var` with `let` everywhere. TBD if that's a good
idea or not.
1 files changed, 1 insertions(+), 1 deletions(-)

M layouts/partials/head.html
M layouts/partials/head.html => layouts/partials/head.html +1 -1
@@ 41,7 41,7 @@ $(document).ready(function() {
    let all_classes = this.className.split(/\s+/);
    let classes = all_classes.filter(c => c.startsWith("target-"));
    for (let c = 0; c < classes.length; c++) {
      var target = "." + classes[c].split(/\-/)[1];
      let target = "." + classes[c].split(/\-/)[1];
      $(target).toggleClass("shown");
    }
  });