页面固定插件 MakeFixed.js
- 授权协议: GPL
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/guimadaleno/makefixed.js
软件介绍
MakeFixed.js 是一个轻量级 jQuery 插件,它可以在滚动过程中动态地建立固定的元素,并且它还带有回调函数。
示例代码:
$('.fixed').makeFixed
({ onFixed: function (el)
{ if ($(el).attr('id') == 'photo')
{
$(el).children().css
({
width: '500px'
});
}
}, onUnFixed: function (el)
{ if ($(el).attr('id') == 'photo')
{
$(el).children().css
({
width: '450px'
});
}
}
});