JavaScript library for using Georgian keyboard layout in HTML elements.
Sometimes you’ll need to perform specific actions when an element becomes active/inactive with Geokeyboard.
In this case you need to provide change
option (a function that receives current state as its first argument) to
selector configuration. This is a third parameter of constructor and second for listen
method.
var geokb = new Geokeyboard;
geokb.listen('#input1', {
change: function(active) {
if (active) {
// ...
} else {
// ...
}
}
})
or
new Geokeyboard('#input1', {}, {
change: function(active) {
if (active) {
// ...
} else {
// ...
}
}
});
In this situation you’re using the same function in constructor parameters, not selector options:
new Geokeyboard('#input1', {
change: function(active) {
if (active) {
// ...
} else {
// ...
}
}
}, {});
new Geokeyboard('#input1, #input2', {}, {
type: function(selector, fullText) {
// ...
}
})
Finally, you can read about How to extend geokeyboard.js