(function(){
var imgArr = ['run1.png','run2.png','run3.png','run4.png','run5.png','run6.png','run7.png','run8.png','run9.png','run10.png','run11.png','run12.png','run13.png','run14.png','run15.png','run16.png','run17.png','run18.png','run19.png'];
var timer = null;
var windowW = window.screen.width;
var windowH = window.screen.height;
var num = 0;
var $span = $('.onbox span');
var flag = true;
var nowTime,endTime;
//var time = 0;
//鼠标按下点击赞出现
$('.wrap_r').on('touchstart',function(){
nowTime = new Date().getTime();
if(nowTime - endTime < 800){
flag = true;
}
if(flag){
$('.wrap_r i').addClass('active');
flag = !flag;
}else{
$('.wrap_r i').removeClass('active');
flag = !flag;
return;
}
$('.onbox').show();
timer = setInterval(function(){
num++;
for(var i=0; i<4; i++){
//获取一个从0-18的随机数
var randomNum = parseInt( Math.random()*19 );
//获取一个随机距离
var ranIndex = Math.random();
var minWDis = parseInt( -ranIndex*windowW + windowW * 0.9 ); //随机X
var minHDis = parseInt( -ranIndex*windowH * 0.8 + windowH * 0.2 ); //随机Y
var ranDeg = parseInt( ranIndex * 360 ); //随机芦隐度数
var $li = $('
的点赞效果