jQuery Animate dosn´t work

Hello, i have the problem that a jquery function does´t work in my project.
Always use it in other projects:

function goToByScroll2(id){
    $('html,body').animate({
        scrollTop: $("#"+id).offset().top} , 1000,  );
}

Any help or idea?

It’s not really a Kirby question so I think it would be better to ask that on http://stackoverflow.com.

There should probably not be a comma after 1000, but if it does not work anyway, I suggest to ask this questions on Stack Overflow an continue the discussion there.

I thought that its an issue with Kirby, but really was just the comma. Stupid! Thanks