• 这压缩靠谱么【已解惑】


    function ooaoao($dom, target, e) {
    	var left = $(target).offset().left,
    		top = $(target).offset().top,
    		domHeight = this.boxHeight + e.clientY,
    		domWidth = this.boxWidth + e.clientX + $(target).parent().width(),
    		screenH = $(window).height() - $('#global_header').height(),
    		screenW = $(window).width();
    
    	top = domHeight > screenH ? top - (domHeight - screenH) : top;
    	left = domWidth > screenW ? left - (domWidth - screenW) : left + $(target).parent().width();
    
    	$('#shareBox').css({
    		'left': left,
    		'top': top,
    		'z-index': 100,
    		position: 'absolute'
    	});
    }
    

      

    function ooaoao(a, c, b) {
    	var a = $(c).offset().left,
    		d = $(c).offset().top,
    		e = this.boxHeight + b.clientY,
    		b = this.boxWidth + b.clientX + $(c).parent().width(),
    		f = $(window).height() - $("#global_header").height(),
    		g = $(window).width(),
    		d = e > f ? d - (e - f) : d,
    		a = b > g ? a - (b - g) : a + $(c).parent().width();
    	$("#shareBox").css({
    		left: a,
    		top: d,
    		"z-index": 100,
    		position: "absolute"
    	})
    };
    

      

    这压缩很靠谱,只是某人写的代码很不靠谱。我真想@一下他

    上面参数中的$dom,在函数中没用过,参数e在函数体第四行之后就没再用了,所以在第五行就开始被覆盖了。

  • 相关阅读:
    四则运算
    3.12----对potplayer的使用评价
    对软件工程的一点思考
    个人附加作业
    附加题
    个人最终总结
    结对编程总结
    修改后的四则运算
    阅读程序回答问题
    Visual studio 2013的安装和单元测试
  • 原文地址:https://www.cnblogs.com/arliang/p/2994502.html
Copyright © 2020-2023  润新知