this function is based on jquery 1.6.1 of mine,but i think its fit for most of the jqeury versions

function goToIdByScroll(id){
      $('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
  }//scrol by the element ID
function goToAnchorByScroll(id) {
      $('html,body').animate({ scrollTop: $('a[href$="' + id+'"]').offset().top }, 'slow');
  }//scrol by the anchor that in the href

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2021-10-08
猜你喜欢
  • 2021-07-19
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案