text-overflow:ellipsis
が入力フィールドでアクティブかどうかを検出する方法があるので、ツールチップに全文を表示できるのではないかと思っています。
CSS:
input[type='text']
{
text-overflow:ellipsis;
}
HTML:
<input type="text" onmouseover="Tooltip.Show(this)" value="some long text" />
Javascript:
Tooltip.Show = function (input)
{
// This is where i need the see if the current input show ellipsis.
if ($(input).isEllipsisActive())
{
// Show the tooltip
}
}
BR
アンドレアス
この質問はinput
要素に関するものです。通常の HTML 要素 (例: div
) も持つ必要があります。
white-space: nowrap;
overflow: hidden;
適用するためtext-overflow: ellipsis;
。(またはOverflow
も指定できます。) 詳細については、このリンクを参照してください。scroll
auto