Last active
January 9, 2018 09:46
-
-
Save alanfluff/4353262 to your computer and use it in GitHub Desktop.
Yellow fade effect with JQuery - Stack Overflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.highlight = function () { | |
$(this).each(function () { | |
var el = $(this); | |
$("<div/>") | |
.width(el.outerWidth()) | |
.height(el.outerHeight()) | |
.css({ | |
"position": "absolute", | |
"left": el.offset().left, | |
"top": el.offset().top, | |
"background-color": "#ffff99", | |
"opacity": ".7", | |
"z-index": "9999999" | |
}).appendTo('body').fadeOut(1000).queue(function () { $(this).remove(); }); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test of CodeBox to gist sharing.
The above came from http://stackoverflow.com/questions/848797/yellow-fade-effect-with-jquery/13106698#13106698