{"size": 2038, "ext": "js", "max_stars_repo_path": "public/script/mindex.js", "max_stars_repo_name": "freshCoderOfXiyou/electricity-website", "max_stars_repo_stars_event_min_datetime": "2017-04-10T07:46:15.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-06T01:14:43.000Z", "max_issues_repo_path": "public/script/mindex.js", "max_issues_repo_name": "freshCoderOfXiyou/electricity-website", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/script/mindex.js", "max_forks_repo_name": "freshCoderOfXiyou/electricity-website", "max_forks_repo_forks_event_min_datetime": "2018-02-26T08:02:15.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-18T12:26:24.000Z"}
{"max_stars_count": 12, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 25.1604938272, "max_line_length": 69, "alphanum_fraction": 0.5780176644}
	(function () {
	$().ready(function  () {
		var slidewrap=document.getElementsByClassName('slidewrap')[0]
		var $slidewrap = $(".slidewrap")
		// console.log($slidewrap[0])

		var startX = 0
		var startY = 0
		var transX = 0
		/*define a handle */
		function handlestart (e) {
			if(e.touches.length!==1){
				return
			}
			startX=e.touches[0].pageX
			startY=e.touches[0].pageY
			slidewrap.addEventListener('touchmove',handlemove,false)
			console.log('123')
		}	

		function handlemove (e) {
			var touches=e.touches
			if (touches&&touches.length) {
				var distanceX=startX-touches[0].pageX
				// console.log(distanceX)
				if (distanceX > 0) {
					transX = transX - 2
				}else{
					transX = transX + 2
				}
				
				console.log(transX)
				$slidewrap.css("transform" , "translate3d("+transX+"px,0,0)")

				// var slidewrapLoc=parseInt($('.slidewrap').css('left'))
				// var slideTransLoc = parseInt($(".slidewrap").css("transform"))
				// var nowLoc=-slidewrapLoc-distanceX
				// $('.slidewrap').css('left',nowLoc+'px')
				// console.log(nowLoc)
				// console.log(distanceX)
				// if (distanceX>0) {

				// }
				// else{
				// 	return
				// }
				// var distanceY=startY-touches[0].pageY
				// if (distanceX>=50) {
				// 	$('.header').css('background','red')
				// }
				// if (distanceX<=-50) {
				// 	$('.header').css('background','yellow')
				// }
				// if (distanceY>=50) {
				// 	$('.main').css('background','green')
				// }
				// if (distanceY<=-50) {
				// 	$('.main').css('background','pink')
				// }
				// if (Math.abs(distanceX)>=50 || Math.abs(distanceY) >= 50) {
				// 	main.removeEventListener('touchmove', handlemove)
				// }
			}
			e.preventDefault()
		}	

		
		slidewrap.addEventListener('touchstart',handlestart,false)

		$("#mshopcart-btn").bind("click" , function () {
			$.get("/hasLoadAjax" , function (result) {
				
			})
		})

		//banner js
		//function roll up in a single height
		var $verRollPnode=$('.rollInfo-wrap')
		verticalRoll($verRollPnode)
	})//end $().ready()
})()