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
精彩评论