开发者

Code Help, Mootools fading image on the gallery

I need help enhancing this Gallery (tutorialdog.com/javascript-image-gallery-using-mootools/), I've tried on my own (I'm new to js programming), But I haven't figure it out how to code it right resulting to the effect that I want. I've tried chaining the opacity but I wasn't successful.

here's the code

    window.addEvent('domready', function() {
        var drop = $('large');
        var dropFx = drop.effect('backgro开发者_如何学Cund-color', {wait: false});
        $$('.item').each(function(item){
            item.addEvent('click', function(e) {
                drop.removeEvents();
                drop.empty();
                var a = item.clone();
                a.inject(drop);
                dropFx.start('7389AE').chain(dropFx.start.pass('ffffff', dropFx));
            });
        });
    });

Basically the effect I want is, I want to add fading effect on the large preview once it has been clicked.

Thanks!


you can just do drop.fade("in"); to affect the whole larger zone or you could do a.inject(drop).fade("in"); to only fade the larger image

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜