Yellow fade effect with JQuery

前端 未结 15 1774
萌比男神i
萌比男神i 2020-11-29 16:23

I would like to implement something similar to 37Signals\'s Yellow Fade effect.

I am using Jquery 1.3.2

The code

(function($) {
   $.fn.yell         


        
15条回答
  •  情书的邮戳
    2020-11-29 17:09

    The jQuery effects library adds quite a bit of unneeded overhead to your app. You can accomplish the same thing with jQuery only. http://jsfiddle.net/x2jrU/92/

    jQuery.fn.highlight = function() {
       $(this).each(function() {
            var el = $(this);
            el.before("
    ") el.prev() .width(el.width()) .height(el.height()) .css({ "position": "absolute", "background-color": "#ffff99", "opacity": ".9" }) .fadeOut(500); }); } $("#target").highlight();

提交回复
热议问题