1

I trying animate a horizontal scroll, but get a litle bug in IE and FF, when click to scroll, gets a "flash" looks like a ghost of previous divs. Its hard to explain in words, see the example in http://amplabusca.org/teste2/ementa.php

Why does this happen?

Mysteriis
  • 39
  • 6

1 Answers1

2

Change your click-Event to something like $('#next').click(function (event) { event.preventDefault(); // Your code... }); to prevent the "move to anchor" standard behavior.

$('#next').click(function(event) {
    event.preventDefault();
    margin +=width;
    $('html, body').stop().animate({scrollLeft:"+="+500},1000);
    $("#prev a").css('visibility','visible');
});
michelgotta
  • 976
  • 8
  • 11