From 22ed23dc14b8a3a3aeb5622c0a496e6a116eb3b0 Mon Sep 17 00:00:00 2001 From: Shobha Venkatraman Date: Wed, 6 Apr 2016 13:15:31 -0400 Subject: [PATCH] Update main.js --- js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index d7ffe45..d049c7c 100755 --- a/js/main.js +++ b/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")); -}); \ No newline at end of file +});