From fdaf2b9d1272677e049d1b492baf27006250805d Mon Sep 17 00:00:00 2001 From: Ryusuke Homma Date: Sat, 3 Jun 2017 23:14:09 +0900 Subject: [PATCH] Fix uncaught type error on clicking lexical this --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index bd6ca7c..db444f1 100644 --- a/index.js +++ b/index.js @@ -40,8 +40,8 @@ $(".showcase").css("display", "none") $(".showcase:first").css("display", "block") $("li.subtitle:first").addClass("selected") - $(".nav a").click(function (ev) { - var id = $(ev.target).attr("href").replace(/^#/, "") + $(".nav a").click(function () { + var id = $(this).attr("href").replace(/^#/, "") $(".showcase").css("display", "none") $(".showcase_" + id).css("display", "block") $("li.subtitle").removeClass("selected")