在一個大的形式,我想顯示在每個表單字段其他信息時,他們是活躍,這樣的事情:JQuery的形式提示
alt text http://i50.tinypic.com/1sehlj.png
所以每個表單字段都有一個相關的提示文本,並且此提示文本顯示在焦點上。
東西臨客這個在HTML/JavaScript的:
<input type="text" id="VIN" name="VIN" class="tooltipped">
<label for="VIN" class="formfieldtooltip">A vehicle Iden... </label>
<input type="text" id="Brand" name="Brand" class="tooltipped">
<label for="Brand" class="formfieldtooltip">In Danish "brand" means "fire"</label>
<script type="text/javascript">
jQuery(function($) {
$(".tooltipped").FormFieldToolTipBinder();
});
</script>
通過與類「tooltipped」的所有窗體字段運行並顯示焦點關聯的標籤。
有沒有這樣的事情已經存在,還是我必須自己寫?
是的,我用Google搜索 - 發現了很多插件,使實際的工具提示,但沒有什麼電線他們與formfields自動將這個樣子。
其實我沒有堅持這一說法,所以這個完美的作品。我只是添加了一些處理模糊事件,所以提示消失了,然後我完成了。 謝謝。 :) – Kjensen 2009-12-09 20:03:31