data2 / taojing Goto Github PK
View Code? Open in Web Editor NEWThis project forked from lopzz/taojing
仿京东电商pc端首页:1、使用jQuery封装显示隐藏模块,分别用css3和js实现淡入淡出、从左往右滑出、从上往下滑出等方法,并用于构 建站点导航栏组件和商品分类组件的动画效果。 2、商品搜索模块使用延时请求,避免每输入一个字就请求一次数据,减少请求次数和服务器压力。 3、站点导航栏、商品分类、幻灯片、推荐商品模块使用懒加载,大幅度减少用户等待页面加载时间,优化用户体验。 4、用jQuery实现并封装幻灯片模块,实现淡入淡出和无缝滑动效果。 5、封装一个函数,检测浏览器是否支持transitionend事件,用于显示隐藏模块的css3和js方法的选取;并能够检测各个主流 浏览器的transitionend事件名,实现浏览器兼容。 6、实现数据缓存,减少数据的请求次数。 7、多次使用发布-订阅模式,实现对象之间的松耦合。8、搜索框搜索结果来自淘宝api。