We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e83461 commit 0953aaaCopy full SHA for 0953aaa
public/demo.html
@@ -258,9 +258,11 @@ <h3>Custom markup for items box</h3>
258
259
<div class="code">
260
<pre><code class="language-javascript">$('.custom-options').selectric({
261
- optionsItemBuilder: function(itemData, element, index) {
262
- return element.val().length ? '<span class="ico ico-' + element.val() + '"></span>' + itemData.text : itemData.text;
263
- }
+ optionsItemBuilder: function(itemData) {
+ return itemData.value.length ?
+ '<span class="ico ico-' + itemData.value + '"></span>' + itemData.text :
264
+ itemData.text;
265
+ }
266
});</code></pre>
267
<br>
268
<pre data-src="customoptions.css"></pre>
0 commit comments