Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update main.js
  • Loading branch information
shv02001 committed Apr 6, 2016
1 parent 0f7ce80 commit 22ed23d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/main.js
@@ -1,12 +1,13 @@
$(document).ready(function() {
//toggle class of background when you click the button
$(".thebutton").click(function() {
$(this).toggleClass("voidfilled");
});
});

//change the text that appears when you click the button
$(".thebutton").on("click", function() {
var el = $(this);
el.text() == el.data("text-swap") ?
el.text(el.data("text-original")) :
el.text(el.data("text-swap"));
});
});

0 comments on commit 22ed23d

Please sign in to comment.