This library requires Backbone and jQuery. This library provide events for mobile keyboard open/close. Basically it binds on focus event in iPhone and iPad devices and on resize in other devices. Was tested on iPad, iPhone and Android. if it won't work on other device please mail me)
To rebind events, when you view was rerendered trigger Backbone event virtualKeyboard:bindEvents
Backbone.trigger("virtualKeyboard:bindEvents");
When device was detected (Other, iPad, iPhone) virtualKeyboard:device.detected
will be triggered
Basically this event triggering only at start, but this event will be triggered also if you manually trigger event virtualKeyboard:device.detect
Backbone.on("virtualKeyboard:device.detected", function(deviceInfo){
/*
deviceInfo = {
type: (Other || iPad || iPhone),
version: (int)
}
*/
...
});
When keyboard is opened it triggers 2 events virtualKeyboard
and virtualKeyboard.opened
When keyboard is opened it triggers 2 events virtualKeyboard
and virtualKeyboard.closed