摘要: 1、html5, try to usehttp://html5please.com/http://caniuse.com/2、learn javascriptlearn javascript with Uncle Tom3、Jobjob from lagou4、JavaScript RegExpby... 阅读全文
posted @ 2014-07-04 14:36 farawayfromhome 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 原生的滚轮事件:火狐与其他浏览器使用了不同的事件/* * 滚轮事件只有firefox比较特殊,使用DOMMouseScroll; 其他浏览器使用mousewheel; * */// firefoxdocument.body.addEventListener("DOMMouseScroll", fu... 阅读全文
posted @ 2014-07-03 15:46 farawayfromhome 阅读(476) 评论(0) 推荐(1) 编辑
摘要: 兼容:ie9以上特点:滑动图片看起来永远只有两帧,过度完美;是html css js的完美配合;其中html的data属性起了关键性作用前提:normalize.css jquery.jshtml 代码: 0 1 ... 阅读全文
posted @ 2014-06-30 14:52 farawayfromhome 阅读(1078) 评论(0) 推荐(0) 编辑
摘要: Node.js是什么?Node.js是javascript语言在服务器端的应用。它的功能就好比是PHP + Apache。Node.js内建了HTTP服务器支持。Node.js遵循CommonJS的模块化方式。http是其中的一个模块。Node.js为网络而生。Node.js的特点:异步式I/O与事... 阅读全文
posted @ 2014-06-24 14:02 farawayfromhome 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 预定义html代码:没有 所有代码通过js生成和移除。预定义css.z-popup-overlay{ width:100%; min-height: 100%; height:800px; position: absolute; top:0; left:0; ... 阅读全文
posted @ 2014-06-23 16:33 farawayfromhome 阅读(554) 评论(2) 推荐(0) 编辑
摘要: 插件代码;(function ($) { // jQuery marquee 插件 $.fn.marquee = function (options) { // 默认设置 var defaults = { derection: "top"... 阅读全文
posted @ 2014-06-20 14:48 farawayfromhome 阅读(454) 评论(0) 推荐(0) 编辑
摘要: html结构 Users Groups item1 item2 css样式.tabs{ width:500px; height:30px; background:#eee;}.tabs li{ float:left; width:250px... 阅读全文
posted @ 2014-06-18 11:23 farawayfromhome 阅读(311) 评论(0) 推荐(0) 编辑
摘要: setTimeout 比 setInterval 性能更好// 取代setIntervalsetTimeout(function self () { // code goes here setTimeout(self, interval);}, interval);对异步执行的大... 阅读全文
posted @ 2014-06-12 13:51 farawayfromhome 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 张鑫旭:ECMAScript5介绍淘宝整理的es5-safe/********* It provides the following methods:Function.prototype.bindObject.keysArray.isArrayArray.prototype.forEachArra... 阅读全文
posted @ 2014-06-12 10:46 farawayfromhome 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 使用html5标签吧!ie6、ie7、ie8不支持怎么办?它的原理是如此的简单: 1、document.createElement("ele"); // js虚拟创建一个元素,而不必添加到文档中 2、ele {display:block;} // css设定它为一个块状元素// js code ... 阅读全文
posted @ 2014-06-12 10:08 farawayfromhome 阅读(441) 评论(0) 推荐(0) 编辑