Sign inSign up

Baidu Zhidao-Style Fixed Scrolling Title Plugin

Add-ons
2026-07-25 22:43 5 views • 0 downloads 2.5KB
Baidu Zhidao-Style Fixed Scrolling Title Plugin

Last Updated: 2018/6/27 10:02:54 AM

Changelog:Updated the initialization method and added compatibility with IE6 and above.


Title Pinning Feature

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$(".order-module").titleScrollTop({
target: '.order-left', // Class name of the element to be positioned
className: 'active', // Class name added when scrolling to the top
hideTarget: '.order-line', // Class name of the element to hide after it is pinned to the top
beforeTopStyle: { // Styles before scrolling to the top. The top value already has a default value. If top is passed in, it replaces the default value.
position: 'relative',
left: 'auto',
marginLeft: 'auto',
},
topedStyle: { // Styles after scrolling to the top. The top value already has a default value. If top is passed in, it replaces the default value.
position: 'fixed',
left: '50%',
marginLeft: '-502px',
}
});