tinybeans/jq-plugin-flexibleSearch

resultItemTmplの設定例のままだとUncaught ReferenceError: op is not definedというエラーになる

Closed this issue · 1 comments

README.mdのresultItemTmplの設定例で

resultItemTmpl: [
	'<div id="' + op.resultBlockId + '-items">',
    	'<ul>',
    	'{{#items}}',
        	'<li><a href="{{permalink}}">{{&title}}</a></li>',
	    '{{/items}}',
    	'</ul>',
	'</div>'
].join(""),

op.resultBlockIdをflexibleSearch-config.jsのoptionの中に記述していますが、この書き方だとopが定義される前に呼び出されるためUncaught ReferenceError: op is not definedというエラーになってしまいます。

@nakamoto-upost ご指摘ありがとうございます。
サンプルコードを修正しました。
ee9e042