摘要: var p=0,t=0; $(window).scroll(function(e){ p = $(this).scrollTop(); if(t=300){ $(".indexTop-bg").addClass("cufa"); $(".huiTop").show(); } }else{ ... 阅读全文
posted @ 2017-06-14 16:19 Lucky、 阅读(1186) 评论(0) 推荐(0) 编辑
摘要: 1 $(document).ready(function(){ 2 var ht_ = $(window).height(); 3 $(".indexOne,.indexOne .banner li,.indexOne .banner img").height(ht_); 4 5 //浏览器窗口的大小变化时触发 6 $(window).resize(function... 阅读全文
posted @ 2017-05-31 14:13 Lucky、 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 列表index下标取值 实现方式是:data-index="{{index}}"挖坑及e.currentTarget.dataset.index来填坑即可 如果不使用e.currentTarget而使用e.target会怎样? 将会导致仅点中<view>才能输出index值,点子元素<image>或 阅读全文
posted @ 2017-05-18 11:00 Lucky、 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 把body的overflow设置成为"hidden"。 阅读全文
posted @ 2017-04-12 09:19 Lucky、 阅读(92) 评论(0) 推荐(0) 编辑
摘要: function getDateDiff(dateTimeStamp){ var minute = 1000 * 60; var hour = minute * 60; var day = hour * 24; var halfamonth = day * 15; var month = day * 阅读全文
posted @ 2017-04-11 15:47 Lucky、 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 解决方案: input[type="text"] { -webkit-appearance: none; } textarea{ -webkit-appearance: none; } 阅读全文
posted @ 2017-04-07 09:11 Lucky、 阅读(1415) 评论(0) 推荐(0) 编辑
摘要: 解决方案: 因为banner图是动态创建的,在插件开始初始化时,文档流中没用图片,故没有创建相应宽度,通过调整js加载顺序,问题还是没有解决。最后找到swiper插件 api 有属性是可以根据内容变动,自动初始化插件的,添加observer:true后问题解决! 示例: var mySwiper = 阅读全文
posted @ 2017-04-07 09:11 Lucky、 阅读(860) 评论(1) 推荐(1) 编辑