Last active
December 10, 2015 17:29
-
-
Save mrcave/4468146 to your computer and use it in GitHub Desktop.
Add a "Read More" link to your blog post summaries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$(".blogList li").each(function () { | |
var postLink = $(this).children("h2").find("a[href]").attr('href'); | |
$(this).children(".postBody").append('<a href="' + postLink + '">Read more...</a>'); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
<script type="text/javascript" src="/js/jquery.read-more-link.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment