looks like the hover won't work because it is never applied to the
next photo (as it isn't a current-class when loaded). Maybe it should
go like this:
function addMyFunctionality() {
$('.current img.after').hover(
function() {
$(this).animate({opacity: "0"});
},
function() {
$(this).animate({opacity: "1"});
}
$('.current').click(function() {
$(this).removeClass('current').addClass
('invisible');
$(this).next('div').removeClass
('invisible').addClass('current');
addMyFunctionality();
});
No comments:
Post a Comment