![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Javascript
Baddyo
这个作者很懒,什么都没留下…
展开
-
移动端页面上拉加载、下拉刷新插件
插件名称:dropload.js GitHub:https://github.com/ximan/dropload 依赖:jQuery1.7以上(http://code.jquery.com/jquery-3.2.1.js) 使用方法:<link rel="stylesheet" href="../dist/dropload.css"><script src="../dist/droploa转载 2017-10-18 15:04:31 · 1680 阅读 · 0 评论 -
H5页面轮播图插件
插件名称:Swiper 官网:http://www.swiper.com.cn/ 依赖:<link rel="stylesheet" href="path/to/swiper.min.css"><script src="path/to/swiper.min.js"></script>//若已经引入jQuery,可以用swiper.jquery.min.js使用:<div class="swi转载 2017-10-18 16:57:39 · 2354 阅读 · 0 评论 -
使用template.js处理数据
状况描述:页面用Ajax向后台请求数据,把数据渲染进列表中。 解决方案:template.js(https://github.com/yanhaijing/template.js) 步骤: 1. 页面引入template.js<script src="js/template.js" type="text/javascript"></script>2.编写要渲染的模板 模板放在scri原创 2017-10-24 15:26:46 · 3283 阅读 · 1 评论 -
利用rem实现响应式布局
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-widt原创 2017-10-17 10:08:29 · 632 阅读 · 0 评论 -
对象转为数组
状况描述:JavaScript用className获取到一系列元素,无法使用forEach方法,因为其为对象而非数组。 解决方案://javascriptvar el=document.getElementsByClassName("el");var arr=[];for(var i in el){ arr.push(el[i]);}console.log(typeof arr)原创 2017-10-17 10:33:12 · 397 阅读 · 0 评论 -
【Gulp】报错Cannot find module 'jshint/src/cli'
状况描述:在使用gulp构建文件时,报错Cannot find module ‘jshint/src/cli’,但是之前已经运行npm install gulp-jshint --save-dev,并在gulpfile.js中引入模块var jshint=require("gulp-jshint")。 解决方案:重新安装:npm install jshint gulp-jshint --save-原创 2017-12-12 16:47:18 · 698 阅读 · 0 评论