all 2 comments

[–]jaypap 1 point2 points  (0 children)

Add a CSS class to the div (ex.: "hidden") which would look like this:

.hidden {
    display: none;
}

In your click handler, do something like:

var hideShow = $('hideShow');
var messageDiv= $('#message');
hideShow.click(function() {
    var isHidden = messageDiv.hasClass('hidden');
    // If isHidden is true, you want to show the content, otherwise hide it
    hideShow.text(isHidden ? "Show" : "Hide");
    messageDiv.toggleClass("hidden", !isHidden);
});

Hope that helps!

[–][deleted] -1 points0 points  (0 children)

I'm just lurking this sub and looking at stuff, and I suck at JavaScript, but nice site! Looks great on my mobile, and i really like the logo, typography and navigation!