开发者

looking for a highlightFade plugin for mootools [closed]

Closed. This question is seeking recommendations for boo开发者_StackOverflow中文版ks, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

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 question

Similar 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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜