Skip to content

Instantly share code, notes, and snippets.

@magnars
Created September 30, 2014 13:35
Show Gist options
  • Save magnars/7227d987e6c760a97041 to your computer and use it in GitHub Desktop.
Save magnars/7227d987e6c760a97041 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.hidden {display: none;}
</style>
</head>
<body>
<div class="text">
<div class="summary">
<p>Short summary here</p>
</div>
<div class="full-text hidden" id="article-45456123">
<p>Long text....</p>
</div>
</div>
<script src="lib/jquery.js"></script>
<script src="src/read-more.js"></script>
<script>
var textElement = document.querySelector(".text");
jstdd.addReadMoreLink(textElement);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment