当前位置: 首页 > news >正文

网上做流量对网站有什么影响谷歌三件套一键安装

网上做流量对网站有什么影响,谷歌三件套一键安装,东莞网络推广公司,专业的网站建设官网前言#xff1a;由于Kissy WaterFall默认是监听滚动事件来实现数据动态加载的#xff0c;但是有一些情况要用到手动加载数据。以下是使用Kissy WaterFall实现手动加载数据的方法。 最终实现效果#xff1a;点击”逛更多的商店“会动态加载数据 步骤#xff1a; 当一页数据加… 前言由于Kissy WaterFall默认是监听滚动事件来实现数据动态加载的但是有一些情况要用到手动加载数据。以下是使用Kissy WaterFall实现手动加载数据的方法。 最终实现效果点击”逛更多的商店“会动态加载数据 步骤 当一页数据加载完成后停止监听滚动事件 //加载一页数据完成后触发的事件waterfall.on(addComplete, function () {S.log(after add complete!);waterfall.pause();});为按钮绑定重启监听滚动事件 //加载更多按钮$(#button_container_more).on(click,function(){ waterfall.resunme();});附录waterfall.pause()与water.resunme()的说明从官网上转载的 pause()函数和resunme()函数属于插件里的waterfall.loader对象的 resunme() 继续开始监控scroll事件随时可能会动态加载 pause() 停止监控scroll事件停止动态加载 参考网址http://docs.kissyui.com/docs/html/api/component/waterfall/loader.html#waterfall.Waterfall.prototype.pause 出现问题按照以上来完成的话当点击”加载更多“按钮时只是启动了滚动监听。意思就是要加载数据一要点击按钮二要再次滚动鼠标。这样的用户体验很差。 解决办法修改按钮动作new一个waterfall.loader重新赋值waterfall对象再重新绑定addComplete事件。 代码如下 $(#button_container_more).on(click,function(){ waterfall new Waterfall.Loader({container:#ColumnContainer,load:function (success, end) {$(#loadingPins).show();$(.loader).hide();S.ajax({data:{method:flickr.photos.search,api_key:5d93c2e473e39e9307e86d4a01381266,tags:rose,page:nextpage,per_page:20,format:json},url:http://api.flickr.com/services/rest/,dataType:jsonp,jsonp:jsoncallback,success:function (d) {// 如果数据错误, 则立即结束if (d.stat ! ok) {alert(load data error!);end();return;}// 如果到最后一页了, 也结束加载nextpage d.photos.page 1;if (nextpage d.photos.pages) {end();return;}// 拼装每页数据var items [];S.each(d.photos.photo, function (item) {/*所用到的字段**price**height**collection**title**src*/item.height Math.round(Math.random() * (300 - 180) 180); // fake height item.collection 10; //测试用item.price 1800; //测试用items.push(S.substitute(tpl,item));});success(items);},complete:function () {$(#loadingPins).hide();$(.loader).show();}});},minColCount:2,colWidth:175//align:left // right, center (default)});waterfall.on(addComplete, function () {S.log(after add complete!);waterfall.pause();}); });最终整个脚本文件 KISSY.use(waterfall,ajax,node,button, function (S, Waterfall, io, Node, Button) {var $ Node.all;var tpl $(#tpl).html(),nextpage 1,waterfall new Waterfall.Loader({container:#ColumnContainer,load:function (success, end) {$(#loadingPins).show();S.ajax({data:{method:flickr.photos.search,api_key:5d93c2e473e39e9307e86d4a01381266,tags:rose,page:nextpage,per_page:20,format:json},url:http://api.flickr.com/services/rest/,dataType:jsonp,jsonp:jsoncallback,success:function (d) {// 如果数据错误, 则立即结束if (d.stat ! ok) {alert(load data error!);end();return;}// 如果到最后一页了, 也结束加载nextpage d.photos.page 1;if (nextpage d.photos.pages) {end();return;}// 拼装每页数据var items [];S.each(d.photos.photo, function (item) {/*所用到的字段**price**height**collection**title**src*/item.height Math.round(Math.random() * (300 - 180) 180); // fake height item.collection 10; //测试用item.price 1800; //测试用items.push(S.substitute(tpl,item));});success(items);},complete:function () {$(#loadingPins).hide();}});},minColCount:2,colWidth:175//align:left // right, center (default)});waterfall.on(adjustComplete, function () {S.log(after adjust complete!);});//加载一页数据完成后触发的事件waterfall.on(addComplete, function () {S.log(after add complete!);waterfall.pause();});// scrollTo$(#BackToTop).on(click, function (e) {e.halt();e.preventDefault();$(window).stop();$(window).animate({scrollTop:0}, 1, easeOut);});//加载更多按钮$(#button_container_more).on(click,function(){ waterfall new Waterfall.Loader({container:#ColumnContainer,load:function (success, end) {$(#loadingPins).show();$(.loader).hide();S.ajax({data:{method:flickr.photos.search,api_key:5d93c2e473e39e9307e86d4a01381266,tags:rose,page:nextpage,per_page:20,format:json},url:http://api.flickr.com/services/rest/,dataType:jsonp,jsonp:jsoncallback,success:function (d) {// 如果数据错误, 则立即结束if (d.stat ! ok) {alert(load data error!);end();return;}// 如果到最后一页了, 也结束加载nextpage d.photos.page 1;if (nextpage d.photos.pages) {end();return;}// 拼装每页数据var items [];S.each(d.photos.photo, function (item) {/*所用到的字段**price**height**collection**title**src*/item.height Math.round(Math.random() * (300 - 180) 180); // fake height item.collection 10; //测试用item.price 1800; //测试用items.push(S.substitute(tpl,item));});success(items);},complete:function () {$(#loadingPins).hide();$(.loader).show();}});},minColCount:2,colWidth:175//align:left // right, center (default)});waterfall.on(addComplete, function () {S.log(after add complete!);waterfall.pause();}); });//收藏按钮功能var collect;$(#ColumnContainer).delegate(mouseover, .collect, function (event) {var w $(event.currentTarget).children(span);var text w.text();if(text 0){collect text;}w.replaceWith(span classcollects收藏/span);//w.css(text-indent,3px);});$(#ColumnContainer).delegate(mouseout, .collect, function (event) {var w $(event.currentTarget).children(span);w.replaceWith(span classcollectionAmountcollect/span);//w.css(text-indent,13px);});});转载于:https://www.cnblogs.com/JerryC/p/3832149.html
http://www.ihoyoo.com/news/20014.html

相关文章:

  • 哪个浏览器不屏蔽网站杭州高端品牌网站建设
  • 网站建设的本质关键词免费
  • 帮熟人做网站如何收费南桥网站建设
  • 网站后台无法设置无锡网站制作建设
  • 免费外链网站网站开发所需要的语言
  • 如何免费建立网站做特价的网站
  • 全球最好的设计网站龙岗成交型网站建设
  • 兰州画册设计公司seo在线培训课程
  • 上海公司网站开发火车头 wordpress 4.9
  • 江苏营销型网站建设公司WordPress评论回复提醒勾选
  • 网站建设一二级目录装修公司电话号码大全
  • 企业网站的功能列表我做的网站手机上不了
  • 都有哪些做二手挖机的网站百度上面如何做网站
  • 东莞建站网站模板天津西青区租房
  • 深圳建站模板购买给金融公司群做网站合法吗
  • 用阿里云做网站网站内容如何管理
  • 简述建设网站的步骤成都网络优化公司排行榜
  • 苏州 网站制作公司微信小程序怎么做网站
  • 想建网站怎么做网站推广策略
  • 做网站什么公司好免费头像在线制作
  • 广东省建设工程质量安全协会网站网站站内推广怎么做
  • 建站工具megento鞍山做网站比较好的公司
  • 厦门做网站找谁1688网站特点
  • 中国建设银行集团网站网站还在建设就已经可以访问了_影响后期百度
  • 视频相亲网站开发成本公司怎么建立自己的网站
  • wordpress 同学厦门搜索引擎优化
  • 杭州网站制作公司网站开发设计合同范本
  • 兴宁区住房和城乡建设局网站wordpress侧栏推荐文章
  • 做柜子网站上门做美容的有什么网站
  • 网站导航栏垂直网站开发优秀论文