Skip to content

Commit 6c65199

Browse files
authored
Merge pull request #161 from n1k0laj/master
Fix demo descriptions for сustom markup for items box
2 parents 27d8854 + 0953aaa commit 6c65199

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

public/demo.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,11 @@ <h3>Custom markup for items box</h3>
258258

259259
<div class="code">
260260
<pre><code class="language-javascript">$('.custom-options').selectric({
261-
optionsItemBuilder: function(itemData, element, index) {
262-
return element.val().length ? '&lt;span class=&quot;ico ico-' + element.val() + '&quot;&gt;&lt;/span&gt;' + itemData.text : itemData.text;
263-
}
261+
optionsItemBuilder: function(itemData) {
262+
return itemData.value.length ?
263+
'&lt;span class=&quot;ico ico-' + itemData.value + '&quot;&gt;&lt;/span&gt;' + itemData.text :
264+
itemData.text;
265+
}
264266
});</code></pre>
265267
<br>
266268
<pre data-src="customoptions.css"></pre>

0 commit comments

Comments
 (0)