jQuery.fn.highlight = function() {
$(this).each(function() {
var el = $(this);
el.after("<div/>");
var d = el.next()
.width(el.width()+10)
.height(el.height())
.css({
"left": el.position().left + 20,
"top": el.position().top,
"position": "absolute",
"background-color": "#ffff99",
"opacity": ".9"
})
.fadeOut(1000);
setTimeout(function(){d.remove()}, 1000);
});
}
项目中用的,参数什么都懒的提取出来了。
JQuery的一个Highlight插件
最新推荐文章于 2021-11-23 19:23:28 发布