Skip to content

Instantly share code, notes, and snippets.

@magnars
Created Sep 30, 2014
Embed
What would you like to do?
<!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