Skip to content

Instantly share code, notes, and snippets.

@DrSammyD
DrSammyD / koSelectizeBinding.js
Last active July 6, 2016 13:07
Selectize Binding Handler
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['knockout','jquery','selectize'], factory);
} else {
var selConstructor = (typeof selectize != "undefined")?selectize:$('<select>').selectize().data('selectize').constructor;
factory(ko,$,selConstructor);
}
})(function (ko,$,selectize) {