Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
before
var template = Hogan.compile('<div class="hit-auto-complete col-md-12">' +
'<div class="row">' +
'<img class="col-lg-1 col-md-1 col-sm-2 col-xs-2" src="http://ecx.images-amazon.com/images/I/{{{i}}}._SL100_.jpg"</img></td>' +
'<div class="typeahead-product-name col-lg-11 col-md-11 col-sm-10 col-xs-10">{{{_highlightResult.p.value}}}</div>' +
'<div class="typeahead-transcript col-lg-11 col-md-11 col-sm-10 col-xs-10">{{{_highlightResult.t.value}}}</div>' +
'<div class="id" style="display: none;">{{{objectID}}}</div>' +
'</div>' +
'</div>');
after (doesn't work):
var template = Hogan.compile('<div class="hit-auto-complete col-md-12">' +
'<div class="row">' +
'<img class="col-lg-1 col-md-1 col-sm-2 col-xs-2" src="http://ecx.images-amazon.com/images/I/{{{i}}}._SL100_.jpg"</img></td>' +
'<div class="typeahead-product-name col-lg-11 col-md-11 col-sm-10 col-xs-10">{{{_highlightResult.p.value}}}</div>' +
'<div class="typeahead-transcript col-lg-11 col-md-11 col-sm-10 col-xs-10">{{{_highlightResult.t.value.substring(0, t.length - 4)}}}</div>' +
'<div class="id" style="display: none;">{{{objectID}}}</div>' +
'</div>' +
'</div>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.