From 3eec1e624d22f509f29f1f689970fca15af7d55a Mon Sep 17 00:00:00 2001 From: Federico Zivolo Date: Mon, 8 Sep 2014 09:40:50 +0200 Subject: [PATCH] js --- material/material.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/material/material.js b/material/material.js index 8a4a0807..e7038784 100644 --- a/material/material.js +++ b/material/material.js @@ -1,4 +1,4 @@ -/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */ +/* globals ripples */ $(function (){ @@ -24,12 +24,14 @@ $(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"); + }); }); -