0

so I have an example of what I have so far here

obvious this is not working because the PHP, let alone the jQuery. its just to show what I am doing.

I want to be able to click on the href, and this will scroll to the fieldset with the appropriate title.

Can anyone help, seems simple but cant get it to work ?

4

1 回答 1

1

将 id 应用于每个字段集并使用以下代码:

    function scrollForMe(top){
    $("html,body").animate({
        scrollTop: top.offset().top
    }, 1000, "easeOutExpo");
}

像这样使用它:

$(".link").click(function(){
    scrollForMe($("#fieldesetname1"));
    return false;
});
于 2012-07-26T10:06:25.523 回答