¥ ('. Access_digital. Add ', ' click ', Function () { var icoimg_btn = $ (this). Parents (". Wtxt"). Siblings (". Icoimg"), WH = $ (window). Height (),//Is the document window height ot = Icoimg_btn.offset (). Top, ds = document.body.scrolltop,//ds = Window.pageyoffset | | Document.documentElement.scrollTop | | Document.body.scrollTop; icoimg_h = Icoimg_btn.height (); BH = wh-icoimg_h-[ot-ds]; Icoimg_btn.css ({bottom:bh,right: "50px"}); Cur = $ (this). Parents (". Wtxt"). Siblings (". Icoimg"); Cur.addclass ("cur"); SetTimeout (function () { $ (". Cur"). Removeclass ("cur"); Cur.removeattr ("style"); },800); });
Css:
@keyframes ico{0% { opacity:1; } 100%{bottom:0; left:3%;width:0.1px;height:0.1px;} } @-webkit-keyframes ico{0% {opacity:1; } 100%{bottom:0; left:3%;width:0.1px;height:0.1px; }}. icoimg{@include rounded (35px); @extend%pa;bottom:10px;left:75%;z-index:999;opacity:0;width:35px;height:35px; &.cur{@extend%block;position:fixed;opacity:1;} &.cur:not (: target) {-webkit-animation-name:ico;-webkit-animation-duration:1s;- Webkit-animation-iteration-count:1;animation-name:ico;animation-duration:1s;animation-iteration-count:1;}}
Mobile Shopping Cart Add animation