From b1f4f744e785e1cd61965e7da285e24de0f3b1c5 Mon Sep 17 00:00:00 2001 From: Igor Chernega Date: Fri, 28 Jul 2017 14:08:10 +0300 Subject: [PATCH] I've put an event handler on input. When the input value is an empty string than we just hide "search-results" with JQuery ".hide()" --- js/everything.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/everything.js b/js/everything.js index db749de2..6abc8fea 100644 --- a/js/everything.js +++ b/js/everything.js @@ -657,6 +657,13 @@ $(function() { $("#demo").hide(); } + // Reverts to Home when there is no text in input + $("#v").on("input", function() { + if ($("#v").val() === "") { + $("#search-results").hide(); + } + }); + $("input[name='toggleRepeat']").change(function() { ZenPlayer.isRepeat = $(this).is(":checked"); });