From 4fd7a94a814a443f9e58d2f612d122e0c1e43c5b Mon Sep 17 00:00:00 2001 From: Federico Zivolo Date: Mon, 8 Sep 2014 09:39:40 +0200 Subject: [PATCH] js fix --- scripts/material.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/material.js b/scripts/material.js index 04be9b07..afa0d0e4 100644 --- a/scripts/material.js +++ b/scripts/material.js @@ -24,12 +24,15 @@ $(function (){ } }); - $(document).on("keyup", ".form-control", function() { + $(document).on("keyup change", ".form-control", function() { if ($(this).val() !== "") { $(this).removeClass("empty"); } else { $(this).addClass("empty"); } }); + $(document).on("keydown", ".form-control", function() { + $(this).removeClass("empty"); + }); });