Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="confession" style="border:3px solid #DDD;">
- </div>
- setTimeout(function(){
- var div = $('.confession');
- $({alpha:1}).animate({alpha:0}, {
- duration: 1000,
- step: function(){
- div.css('border-color','rgba(0,0,0,'+this.alpha+')');
- }
- });
- }, 5000);
- $(".confession").animate({
- borderLeftColor: "white",
- borderTopColor: "white",
- borderRightColor: "white",
- borderBottomColor: "white",
- }, 3000);
- <div class="confession" style="margin:3px;position:relative">
- text
- <div class="fakeBorder"></div>
- </div>
- .fakeBorder
- {
- position:absolute;
- height:100%;
- width:100%;
- left:0px;
- top:0px;
- border:3px solid #DDD;
- margin:-3px;
- }
- $(".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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement