Skip to content

Instantly share code, notes, and snippets.

@Chukslord1
Created February 9, 2021 03:56
Show Gist options
  • Save Chukslord1/1f00a82c975f1f0f8727414ac6026017 to your computer and use it in GitHub Desktop.
Save Chukslord1/1f00a82c975f1f0f8727414ac6026017 to your computer and use it in GitHub Desktop.
fauna appointment scheduler app with django (javascript file)
$(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