looking for a highlightFade plugin for mootools [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this questionSimilar to the highlightFade jQuery plugin I was hoping to find something like this for mootools - anyone know if this exists?
Thank you
Edit
I was able to build my own for the time being
function highlightFadeOnSuccess(lnk) {
var el = lnk.getParent().getParent().getChildren('td')[1];
var morph = new Fx.Morph(el,{ 'duration':'300', link:'cancel',onComplete: function(){fadeOut(el);} });
morph.start({ 'color':'rgb(255,255,0)' });
}
function fadeOut(el) {
var morph = new Fx.Morph(el,{ 'duration':'300', link:'cancel'});
morph.start({ 'color':'rgb(0,0,102)' });
}
Why you're not using http://mootools.net/docs/core/Fx/Fx.Tween#Element:highlight?
If you want to highlight it and then fade out, you could do:
var elem = $('element');
elem.addEvent('click',function(){
this.highlight('#FF0000').get('tween').chain(function(){
this.fade(0);
}.bind(this));
});
demo: http://jsfiddle.net/steweb/3KYqH/
精彩评论