2017-03-08 33 views
1

私はjquery仮想キーボードを使用しており、テキストフィールドの上にキーボードを表示したいとします。私はポジションを設定しようとしました。ここで入力フィールドの上に仮想キーボードを移動する方法は?

jQueryの

$('#test').keyboard({ layout: 'qwerty', usePreview: false,position: { 
     // null = attach to input/textarea; 
     // use $(sel) to attach elsewhere 
     of: null, 
     my: 'left top', 
     at: 'left top', 
     // used when "usePreview" is false 
     at2: 'left top' 
} }); 

HTML

<p style="height:200px" > 
content 
</p> 
<input type="text" class="form-control" id="test" placeholder="test" autocomplete="off"> 

は、デモのURL http://jsfiddle.net/bhumi/rzrjw15h/1/です。

私も試し

position : { 
      of : '#searchterms',  // when null, element will default to kb.$keyboard 
      my : 'top', // 'center top', (position under keyboard) 
      at : 'top-200', // 'center bottom', 

     } 

答えて

1

はトップからの入力フィールドのjsfiddle

$('#test').keyboard({ layout: 'qwerty', usePreview: false, 
    position: { 
    my: 'center bottom', 
    at: 'center bottom', 
    // used when "usePreview" is false 
    at2: 'center top' 
    } 
}); 
1

Working Fiddle

のような位置に設定することを試みた:

$('#test').keyboard({ 
    layout: 'qwerty', 
    usePreview: false, 
    position: { 
    of: null, 
    at2: 'top-100' 
    } 
}); 
+0

位置は動的で参照し、この変更時に機能していません –

関連する問題