Sha256: 4a25f39cb2bd88788b1287816c5a254dcd9dbafe632aba41caf94283eca85b5b
Contents?: true
Size: 797 Bytes
Versions: 11
Compression:
Stored size: 797 Bytes
Contents
Button.func.submit = (self, complete = "Done", reset = true) => { let text = $(self).find(".button-title"), bg = $(self).find(".button-bg"), all = [text,bg,self], tl = gsap.timeline(); Save.text = $(self).find(".button-title").text(); Save.color = $(self).css('backgroundColor'); tl .set(self,{ backgroundColor : tinycolor(Save.color).lighten(44).desaturate(5) }) .set(text,{ color : Save.color }) .set(all,{ clearProps : "all" }) .set([self,bg],{ backgroundColor : Color.green }) .set(text,{ text : complete }) .to(bg,{ duration : 0.5, scaleX : 1.2, scaleY : 1.3, opacity : 0 }); if (reset) { tl.call(()=>{ Button.func.reset(self,Save.text); },"+=1"); } }
Version data entries
11 entries across 11 versions & 1 rubygems