Created
February 9, 2021 03:56
-
-
Save Chukslord1/1f00a82c975f1f0f8727414ac6026017 to your computer and use it in GitHub Desktop.
fauna appointment scheduler app with django (javascript file)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var formInputs = $('input[type="email"],input[type="password"]'); | |
formInputs.focus(function() { | |
$(this).parent().children('p.formLabel').addClass('formTop'); | |
$('div#formWrapper').addClass('darken-bg'); | |
$('div.logo').addClass('logo-active'); | |
}); | |
formInputs.focusout(function() { | |
if ($.trim($(this).val()).length == 0){ | |
$(this).parent().children('p.formLabel').removeClass('formTop'); | |
} | |
$('div#formWrapper').removeClass('darken-bg'); | |
$('div.logo').removeClass('logo-active'); | |
}); | |
$('p.formLabel').click(function(){ | |
$(this).parent().children('.form-style').focus(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment