Last active
March 2, 2017 18:55
-
-
Save bcuz/8e207016d52bf253b876046e579c2bdd 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
| $(document).ready(function() { | |
| $("div.button").hover(function() { | |
| }); | |
| //$(this).toggleClass("button-hover"); | |
| // Start: Title button's functionality | |
| $('#title-form .button').click(function() { | |
| var title = $("#title-input").val(); | |
| $(".list-title").text(title); | |
| }); | |
| // End | |
| // Start: Item button's functionality | |
| $("#item-form .button").click(function() { | |
| var itemText = $("#item-input").val(); | |
| var $item = $('<li><span>' + itemText + '</span><i class="glyphicon glyphicon-remove"></i></li>'); | |
| $(".list").append($item); | |
| $("#item-input").val(""); | |
| }); | |
| $("h1").css('text-align', 'center'); | |
| // End | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment