Skip to content

Commit 3a68a40

Browse files
committed
add list builder option
1 parent 124ec62 commit 3a68a40

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

public/jquery.selectric.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* /,'
1010
* /'
1111
*
12-
* Selectric ϟ v1.11.0 (Sep 24 2016) - http://lcdsantos.github.io/jQuery-Selectric/
12+
* Selectric ϟ v1.11.0 (Sep 27 2016) - http://lcdsantos.github.io/jQuery-Selectric/
1313
*
1414
* Copyright (c) 2016 Leonardo Santos; MIT License
1515
*
@@ -510,6 +510,10 @@
510510
var _this = this;
511511
var markup = '<ul>';
512512

513+
if ( $.isFunction(_this.options.listBuilder) && _this.options.listBuilder ) {
514+
items = _this.options.listBuilder(items);
515+
}
516+
513517
$.each(items, function(i, elm) {
514518
if ( elm.label !== undefined ) {
515519

@@ -1108,6 +1112,7 @@
11081112
allowWrap : true,
11091113
optionsItemBuilder : '{text}', // function(itemData, element, index)
11101114
labelBuilder : '{text}', // function(currItem)
1115+
listBuilder : false,
11111116
keys : {
11121117
previous : [37, 38], // Left / Up
11131118
next : [39, 40], // Right / Down

0 commit comments

Comments
 (0)