滚动条停在原地:<a>标签点击OnClick事件后,滚动条会回到顶部,如果让滚动条停在原来位置不动呢?只需要加上href=“###”,就可以了,滚动条就会停在原地不动了。
滚动条回到顶部:scrolltotop.init({title: '回顶部'});
下面是滚动条回到顶部的代码
//** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09')
//** v1.1 (April 7th, 09'):
//** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page instead.
//** 2) Fixes scroll animation not working in Opera.
var scrolltotop={
//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
//参数配置修改 startline:向下滚动多少像素出现scrolltopcontrol按钮 scr