Skip to content

Commit 124ec62

Browse files
committed
Update index and demo page for new simplified optionsItemBuilder API
1 parent 609de54 commit 124ec62

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ <h4><a href="./demo.html">view more advanced demos and customization →</a></h4
704704
<script>
705705
$(function() {
706706
$('.customOptions').selectric({
707-
optionsItemBuilder: function(itemData, element, index) {
708-
return element.val().length ? '<span class="ico ico-' + element.val() + '"></span>' + itemData.text : itemData.text;
707+
optionsItemBuilder: function(itemData) {
708+
return itemData.value.length ? '<span class="ico ico-' + itemData.value + '"></span>' + itemData.text : itemData.text;
709709
}
710710
});
711711

public/lib/demo.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@
241241
/*------------------------------------*/
242242

243243
$('.custom-options').selectric({
244-
optionsItemBuilder: function(itemData, element, index) {
245-
return element.val().length ?
246-
'<span class="ico ico-' + element.val() + '"></span>' + itemData.text :
244+
optionsItemBuilder: function(itemData) {
245+
return itemData.value.length ?
246+
'<span class="ico ico-' + itemData.value + '"></span>' + itemData.text :
247247
itemData.text;
248248
}
249249
});

0 commit comments

Comments
 (0)