<script>		var swipe=Swipe($("#content"));		  			//获取数据  			var getValues=function (classname) {  				var $elem = $(""+classname+"");  				//走路的路线坐标  				return{  					height:$elem.height(),  					top:$elem.position().top  				}; 				  			};  			//路的Y轴  			var pathY=function () {  				var data=getValues(".a_background_middle");  				return data.top+data.height/2; 				  			}(); 			  			var $boy=$("#boy");  			var boyHeight=$boy.height();  			//修正小男孩的正确位置  			//路的中间位置减去小男孩的高度,25是一个修正值  			$boy.css({  				top:pathY-boyHeight+25  			});						//绑定一个事件开始走路			$("button").click(function () {					//left变化					$boy.transition({			  		 'left': $("#content").width() + 'px',						}, 10000, 'linear', function(){});			    			});										</script>
                    
                    
                添加回答
举报
0/150
	提交
		取消
	