Skip to content

Instantly share code, notes, and snippets.

@qhoxie
Created September 20, 2012 19:55
Show Gist options
  • Save qhoxie/3757972 to your computer and use it in GitHub Desktop.
Save qhoxie/3757972 to your computer and use it in GitHub Desktop.
var customResultRenderFunction = function(ctx, results) {
var $list = ctx.list,
config = ctx.config;
$.each(results, function(document_type, items) {
$.each(items, function(idx, item) {
var $node = $('<li>' + item['title'] + '</li>');
$node.data('document_type', document_type); // saves document_type for later access
$node.appendTo($list);
ctx.registerResult($node, item);
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment