随笔分类 -  JS

摘要:<a href="#"><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif" border="0" onMouseOver="this.src='http://s1.bdstatic.com/r/www 阅读全文
posted @ 2017-08-18 13:52 ghfjj 阅读(663) 评论(0) 推荐(0)
摘要:Fullpage的示例,实现自定义底部高度的方法,而且是不算在滑动的Section里面,在需 要自定义高度的DIV里面,只需要给Section添加.fp-height-auto类就可以实现自定义高度。 http://blog.csdn.net/dengboblog/article/details/5 阅读全文
posted @ 2017-06-23 17:52 ghfjj 阅读(1766) 评论(0) 推荐(0)
摘要:1.将js文件转换 webpack app/main.js public/webpack.js //将app文件家里的main.js 转换成public文件夹下的webpack.js ps:webpack集成了require.js 此操作可以用对应的webpack.config.js配置来代替: 在 阅读全文
posted @ 2017-06-10 15:52 ghfjj 阅读(164) 评论(0) 推荐(0)
摘要:$(window).scroll(function(){ var before = $(window).scrollTop(); $(window).scroll(function() { var after = $(window).scrollTop(); if (before<after) { 阅读全文
posted @ 2017-06-08 11:51 ghfjj 阅读(2256) 评论(0) 推荐(0)
摘要:http://www.codesky.net/article/201705/186834.html 阅读全文
posted @ 2017-06-02 10:12 ghfjj 阅读(240) 评论(0) 推荐(0)
摘要:jquery遍历js数组需要先将js数组对象包装成jquery对象,然后调用jquery的each函数遍历。或者直接调用$.each函数也可以遍历数组。遍历函数中使用this取得当前遍历的项。遍历函数可以带参数,一个参数的话就是数组下标。代码如下。 阅读全文
posted @ 2017-05-16 15:48 ghfjj 阅读(478) 评论(0) 推荐(0)
摘要:div.onclick = function(ev){ if(ev.target!=this) return; else { ... } } 阅读全文
posted @ 2017-05-15 12:07 ghfjj 阅读(7108) 评论(0) 推荐(0)
摘要:UTC时间 HH:MM:SS 北京时间 HH:MM:SS ... 阅读全文
posted @ 2017-05-04 09:56 ghfjj 阅读(220) 评论(0) 推荐(0)
摘要:var mydate=new Date(); var time=mydate.getFullYear()+'-'+(mydate.getMonth()+1)+'-'+mydate.getDate(); //yyyy-MM-dd 阅读全文
posted @ 2017-04-20 08:59 ghfjj 阅读(217) 评论(0) 推荐(0)
摘要:http://www.jq22.com/jquery-info10555 api:http://foundation-datepicker.peterbeno.com/example.html bug解决: 阅读全文
posted @ 2017-04-19 12:37 ghfjj 阅读(4403) 评论(0) 推荐(0)
摘要:http://www.jq22.com/jquery-info8054 依赖jq 阅读全文
posted @ 2017-04-19 12:33 ghfjj 阅读(5094) 评论(0) 推荐(0)
摘要:上下两段代码效果一样!!! 阅读全文
posted @ 2017-04-19 00:32 ghfjj 阅读(1206) 评论(0) 推荐(0)
摘要:1.通过window.open函数<div onclick="window.open(*http://www.baidu.com*)">在新窗口跳转至百度</div><div onclick="window.open(*http://www.baidu.com*,*_self*)">在当前窗口跳转至 阅读全文
posted @ 2017-04-10 17:10 ghfjj 阅读(33203) 评论(0) 推荐(0)
摘要:下载:https://www.awesomes.cn/repo/Clouda-team/touchjs api:http://www.dowebok.com/93.html 阅读全文
posted @ 2017-04-10 01:23 ghfjj 阅读(1992) 评论(0) 推荐(0)
摘要:var lenght_li=0; $('.info_tab li').each(function(){ lenght_li+=$(this).outerWidth(true); }); $('.info_tab').css({ 'width':lenght_li+1 }); 阅读全文
posted @ 2017-04-09 22:32 ghfjj 阅读(829) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-04-09 22:02 ghfjj 阅读(20366) 评论(0) 推荐(1)
摘要:在制作网站的过程中,经常碰到这样的滚动列表效果--》将列表的所有元素分组,然后进行滚动,比如下图中的效果: 将列表中的元素每5个分为一组(放在一个li里面),然后进行滚动。 在制作动态网站的过程中,无法确定一共有多少个元素,所以不知道改分多少组,在下面的案例中就是不知道该创建多少的li元素来包裹他们 阅读全文
posted @ 2017-04-07 15:50 ghfjj 阅读(165) 评论(0) 推荐(0)
摘要:var num = 8;for (var i = 0; i < num; i++) { $('ul').append('<li></li>');}; 阅读全文
posted @ 2017-04-07 09:32 ghfjj 阅读(718) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-04-03 00:13 ghfjj 阅读(388) 评论(0) 推荐(0)