From bffe8bad0f1e22a7d58b691e0023efebc9b8db8e Mon Sep 17 00:00:00 2001 From: Yehonal Date: Thu, 20 Dec 2018 18:19:35 +0100 Subject: update --- assets/js/red-links.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/red-links.js b/assets/js/red-links.js index 408af0b..1b7b94b 100644 --- a/assets/js/red-links.js +++ b/assets/js/red-links.js @@ -12,7 +12,7 @@ var ext = this.href.split('.').pop().split(/\#|\?/)[0]; if (ext != "html") - this.css('color', 'red'); // pessimistic condition + $(this).css('color', 'red'); // pessimistic condition var that = this; $.ajax({ @@ -24,7 +24,7 @@ error: function (xhr, ajaxOptions, thrownError) { if (xhr.status == 404) { $(that).css('color', 'red'); - } else (xhr.status == 200) { + } else if (xhr.status == 200) { $(that).css('color', ''); } } -- cgit