Skip to content

Instantly share code, notes, and snippets.

@benjskim
Created October 15, 2013 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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