Created
August 1, 2018 19:40
-
-
Save rahman541/d73506b82ef4fcb652c9b0e6d45bbf7b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Functional Programming</title> | |
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> | |
<style type="text/css"> | |
.form-control { | |
margin-top: .5rem; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="form-group"> | |
<input type="email" id="email" class="form-control" placeholder="Email"> | |
<input type="password" id="password" class="form-control" placeholder="Password"> | |
<input type="submit" value="Sign Up" class="btn btn-success" id="signup"> | |
</div> | |
</div> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/bacon.js/2.0.7/Bacon.min.js"></script> | |
<script> | |
$('#email') | |
.asEventStream('blur') | |
.map(function(e){ return !e.target.value; }) | |
.assign($('#signup'), 'attr', 'disabled'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment