2012-08-10 3 views
3

키오스크 용 온 스크린 키보드를 만들기 위해이 플러그인 (http://www.jquery4u.com/plugins/jquery-screen-keyboard-plugin/#.UCTg6p1lTkd)을 사용하고 있습니다. 그것은 잘 작동하지만 입력/텍스트 영역 아래가 아닌 화면 하단에 키보드가 나타나야합니다. 외부 jquery.keyboard.js 파일 내에서가상 키보드 플러그인 위치

내가 찾은 다음 내가 대신 '널 (null)'으로 사용한다 무엇

$.keyboard.defaultOptions = { 

     // *** choose layout & positioning *** 
     layout  : 'qwerty', 
     customLayout : null, 

     position  : { 
      of : null, // optional - null (attach to input/textarea) or a jQuery object (attach elsewhere) 
      my : 'center top', 
      at : 'center top', 
      at2: 'center bottom' // used when "usePreview" is false (centers the keyboard at the bottom of the input/textarea) 
     }, 

? 이 코드에 어떻게 추가해야합니까?

감사

of 매개 변수의

답변

5

, 그냥 문서 창을 대상 : $(window).

여기 a demo 그리고 코드 :

$('#keyboard').keyboard({ 

    // Used by jQuery UI position utility 
    position: { 
     of: $(window), // null = attach to input/textarea; use $(sel) to attach elsewhere 
     my: 'center bottom', 
     at: 'center bottom', 
     at2: 'center bottom' // used when "usePreview" is false 
    } 

});​ 

을이 키오스크를 위해이기 때문에, 당신은 또한 위치와 키보드 크기를 조정할 this demo을 확인하려는 있습니다. 또한 이전 및 다음 버튼이 키보드에 추가되었습니다 ... 흠, 이전 및 다음 버튼이 있다고 맹세합니다. 데모를 업데이트해야합니다.

참고 :이 질문이 완전히 누락되었으므로 virtual-keyboard에 대한 태그를 추가했습니다. 또한 documentation을 확인하십시오.