Last active
March 2, 2017 18:57
-
-
Save bcuz/b8055e60f89d80102282235871a33c9e 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