prototype js plugin
by bilbobaggins
HTML
<input type="text" style="width:45%;" class="form-control" data-multipleselect-autocomplete="first_name" id="cltrl_filter_first_name" oninput="multiselect.searchbarautocomplete(this)" placeholder="first name">
JavaScript
let cntrlmultiselect=function (self) {
this.ar = [];
}
cntrlmultiselect.prototype.getval = function() {
return this.ar;
};
cntrlmultiselect.prototype.setval = function(obj) {
this.ar.push(obj)
return true;
};
cntrlmultiselect.prototype.destroy = function(obj) {
this.ar=[]
return true;
};
cntrlmultiselect.prototype.oninput = function(obj) {
console.log(obj)
return true;
};
var intern={}
intern.name="12"
/*var re= new cntrlmultiselect()
re.setval(intern)
console.log(re.getval())
re.destroy()
console.log(re)*/