var instancesMobiscroll = [];
var x = document.getElementById('y');
mobiscroll.enhance(x);
instancesMobiscroll.push(x.mobiscroll('getInst'));
...
for (var i = 0; i < instancesMobiscroll.length; i++) {
instancesMobiscroll[i].destroy();
}
and we have this error:
Uncaught TypeError: x.mobiscroll is not a function
The mobiscroll instance can be retrieved from the input elemets, so you’ll have to query those in the enhanced container, also the mobiscroll.getInst mehtod should be used.
Here is an example:
var x = document.getElementById('y');
mobiscroll.enhance(x);
const input = x.querySelector('input');
const inst = mobiscroll.getInst(input);