I know you can fade out a So I\'ve g
The solution below should meet all of your posted criteria: Wait 5000 ms (5 sec), then animate a fade out of the border that lasts 500 ms (.5 sec). Working example: http://jsfiddle.net/ECRLW/ Since the above solution seems to be unable to animate the borderWidth fade with some browsers, the only other way I would know how to accomplish what you want with jQuery would be to use setTimeout(): Working example: http://jsfiddle.net/mmfMG/
$(".confession").delay(5000).animate({borderWidth: "0"}, 500);
function shrinkBorder(){
var e = $(".confession");
var eBorderWidth = e.css("border-width");
if(eBorderWidth != "0px"){
e.css("border-width",(eBorderWidth.split("px")[0]-1));
setTimeout(shrinkBorder, 50);
}
}
setTimeout(shrinkBorder, 5000);