Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This is the second custom function for our search. It just look sin the JSON file using jQuery getJson.
var displyResult = function(blogTitle,blogCategory,blogTags,blogLink,blogDate,blogSummary) {
var results = '<article class="posts blogpage">'+
'<h2 class="entry-title">'+
'<a class="post-link" href="'+blogLink+'">'+blogTitle+'</a>'+
'<div class="entry-summary">'+
blogSummary +
'<a href="'+blogLink+'">Continued</a>'+
'<span class="badge blog-date">'+
'<time class="published">'+
'<div class="pull-right">';
for (var j in blogTags) {
if (blogTags[j] === null){
} else {
results = results + ' <span class="label label-primary taggedPost"><a href="/search.html?searchbox='+blogTags[j]+'">' + blogTags[j] + '</a></span> ';
results = results + '</div>'+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment