From ad146580dd843297a9832ec387dff77019f85a3e Mon Sep 17 00:00:00 2001 From: Ryosuke Yokoe Date: Sat, 18 Feb 2017 20:48:37 +0900 Subject: [PATCH] Fix floating label --- js/admin.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/admin.js b/js/admin.js index 53ab1fbf..34482b79 100644 --- a/js/admin.js +++ b/js/admin.js @@ -275,6 +275,13 @@ $.AdminBSB.input = { $('body').on('click', '.form-float .form-line .form-label', function () { $(this).parent().find('input').focus(); }); + + //Not blank form + $('.form-control').each(function() { + if ($(this).val() !== '') { + $(this).parent('.form-line').addClass('focused'); + } + }); } } //==========================================================================================================================