MakeFixed.js - 页面固定插件


GPL
跨平台
JavaScript

软件简介

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'
            });
        }
    }
});