jQuery网站右侧悬浮楼层滚动导航代码

jQuery网站右侧悬浮楼层滚动导航代码

jQuery网站右侧悬浮楼层滚动导航代码是一款全屏的悬浮导航菜单控制页面滚动跳转楼层效果,还显示滚动百分比。

部分js代码

<script>
(function () {
		
   //////////////////////
	// Utils
  //////////////////////
    function throttle(fn, delay, scope) {
        // Default delay
        delay = delay || 250;
        var last, defer;
        return function () {
            var context = scope || this,
                now = +new Date(),
                args = arguments;
            if (last && now < last + delay) {
                clearTimeout(defer);
                defer = setTimeout(function () {
                    last = now;
                    fn.apply(context, args);
                }, delay);
            } else {
                last = now;
                fn.apply(context, args);
            }
        }
    }

    function extend(destination, source) {
        for (var k in source) {
            if (source.hasOwnProperty(k)) {
                destination[k] = source[k];
            }
        }
        return destination;
    }
</script>

END
点赞分享 :

常见问题FAQ

免费下载或者VIP会员专享资源能否直接商用?
本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
相关推荐
棋牌源码