0

I'm using this Library to create a virtual keyboard on input elements

The problem is similar to this question.

I need to apply it globally on all input type fields as opposed to being based off the elements id or class. i.e

$('input').keyboard
  showTyping: true
  delay: 250
  tabNavigation: true
  autoAccept: true

The catch is that this will only get bound if a querystring (i.e 'keyboard=true') is present.

Going through all the views and applying this will work (but certainly doesn't seem optimal).

Community
  • 1
  • 1
Jordan
  • 341
  • 1
  • 4
  • 12
  • You can create a base view and have your other views extend that. – Jack Aug 24 '15 at 14:00
  • Yeah I think I found the solution. Already had a custom view that extends backbone.view. My concern was not applying it on pages that don't have input elements. I just do a simply check in the one view and then apply it. – Jordan Aug 24 '15 at 14:03
  • Just like your custom view extends from backbone.view you can have your views extend your custom view (which extends from backbone.view). At any rate if you think your solution would be helpful to others you can answer your own question by posting an answer (you might have to wait some period of time before you can post it). – Jack Aug 24 '15 at 14:05
  • I'll most likely answer it when I have it fully working – Jordan Aug 24 '15 at 14:18

0 Answers0