引用:黑暗執行緒
$.fn.showElemId = function(bgc, fc) {
return this.each(function() {
var $elem = $(this);
//if (!$elem.is(":visible")) return;
var pos = $elem.offset();
var html = " +
(pos.top - 15) + "px; left: " + pos.left +
"px; background-color: " + (bgc || "red") + "; color: " +
(fc || "white") + "; font-size: 11px; line-height: 12px; padding: 1px;'>" +
(this.id || "----") +
"";
$("body").append(html);
});
};
/* 使用範例: $(":text,select").showElemId(); */
2009年10月30日 星期五
[引用]jQuery-將網頁元素名稱標示出來
【下列文章您可能也有興趣】
>>>jquery
- [jquery] stupidtable.js
- []jQuery] 解決 change select 在IE 不能執行.
- [jquery] $.ajax 不使用async: false 來接收return result
- [jquery] 解決flash 覆蓋 div 的問題 , z-index 無效
- [jquery] 輸入欄位預設文字
- [引用]手機網頁-文字自動縮放,等比縮放,文字百分比
- [jquery] 解決 IE 瀏覽器不能使用 change , 與 option 不能 hide()
- [引用] 用Jquery 做 Ajax 上一頁下一頁.
- jQuery Plugin insertContent-在文本框游標位置插入內容並選中
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言