0

Im loading some results with ajax on button click. After each click i scroll to the postion with

    success: function(data) {                       

        $("#test").html(data).fadeIn("slow"); 
        
        $('html , body').stop().animate({
            scrollTop: ($(scrolltarget).offset().top -90)
        }, 600);
        
        return false;                       
        
    },

The problem, after the first load the position is reached so it does not scroll after another click. After each request i want to scroll down a bit and up so the user sees that something happened like the first time. Im not in favor of using a loading gif.

Any idea how to solve this issue?

evavienna
  • 1,059
  • 11
  • 29

1 Answers1

0

have you tried the jquery scroll to method as described here:

Scroll to an element with jQuery

Patrick Hume
  • 2,064
  • 1
  • 3
  • 11