Animation not work when in delay
Hello All,
I'm new to the forums here. I've got a very simple animation happening that when I try to wrap in a delay method that I found
here, the last process does not work (animation opacity 1). Any ideas, pointers?
-
$.fn.delay = function(time, callback)
{
// Empty function:
jQuery.fx.step.delay = function(){};
// Return meaningless animation, (will be added to queue)
return this.animate({delay:1}, time, callback);
}
$('#map').delay(500, function()
{
$('#mapper').attr('style', 'background: url(' + this.src + ');');
$(this).stop().animate({opacity: 0}, 0);
$(this).attr('src', '/public/images/team/map0.jpg');
$(this).stop().animate({opacity: 1}, 600);
});
Thanks in advance!