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">
這裏是演示網址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',
}
位置從頂部是動態的,這個改變時不工作 –