Skip to content

Instantly share code, notes, and snippets.

@benjskim
Created October 15, 2013 21:46
Show Gist options
  • Save benjskim/6999177 to your computer and use it in GitHub Desktop.
Save benjskim/6999177 to your computer and use it in GitHub Desktop.
When I click on ".moreabout" the text successfully changes to "Read Less" but not vice-versa
$(".moreabout").click(function(){
$(".moreabouttext").slideToggle();
if ($(".moreabout").css("display") == "none") {
$(".moreabout").text("Read More");
}
else {
$(".moreabout").text("Read Less");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment