Last active
August 29, 2015 14:05
-
-
Save cyrusdavid/0b0eddeb7c2fddf8fb0a 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> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
</body> | |
<textarea id="make-color-demo"></textarea> <button id="make">Please</button> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script src="http://www.checkman.io/please/js/Please-compressed.js"></script> | |
<script src="script.js"></script> | |
</body> | |
</html> |
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
var div = $('#make-color-demo'); | |
var btn = $('#make'); | |
function please() { | |
var bg = Please.make_color({ | |
hex: true, | |
golden: true, | |
full_random: true | |
}); | |
div.css('background', bg); | |
div.html(bg); | |
div.select(); | |
} | |
$(document).on('click', '#make', function() { | |
please(); | |
}); | |
please(); |
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
#make-color-demo { | |
height: 100px; | |
text-align: center; | |
line-height: 100px; | |
} | |
#make { | |
cursor: pointer; | |
} | |
#make-color-demo, #make { | |
width: 400px; | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
::selection { | |
background: rgba(0,0,0,.2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment