`
pengyaouhyy
  • 浏览: 25039 次
  • 性别: Icon_minigender_1
  • 来自: 成都
文章分类
社区版块
存档分类
最新评论

数据动态加载效果

阅读更多

 

查看演示

 

var ListView={
	Init:function(){
		$(".Item span").css("width",$(".ListView").width()/4+"px");
		for(var i=0;i<$(".Item").length;i++){
			var target=$(".Item")[i];
			$(target).animate({marginLeft:"0px"},300+i*100);
		}
	},
	Update:function(){
		$(".ListView .c .Item").remove();
		for(var i=0;i<10;i++){
			var newItem=$("<div class=\"Item\"> <span>test</span> <span>男/"+i+"</span> <span>四川省,成都市,锦江区</span> <span>详细说明</span> </div>");
			$(newItem).find("span").css("width",$(".ListView").width()/4+"px");
			$(".ListView .c").append(newItem);
			$(newItem).animate({marginLeft:"0px"},300+i*100);
		}
	}
}

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics