- 浏览: 2614654 次
- 性别:
- 来自: 北京
最新评论
-
jertom:
<div id="showInfo" ...
addEventListener等事件监听的参数细谈 -
乌托邦国王:
引用[u][/u]
css3动画属性系列之transform细讲移动translate -
hvang1988:
能提供附件下载吗,找不到js库,google封了访问不了
Syntaxhighlighter---代码高亮插件介绍 -
sscsacdsadcsd:
我的天 那到底是为什么function是object我看und ...
typeof func ==='function'的疑惑 -
wkjiangwk:
试了,没用,你们从不去测试。
介绍一下x-webkit-speech -------实现语音输入
文章列表
本文介绍一下 Backbone.$
If you have multiple copies of jQuery on the page, or simply want to tell Backbone to use a particular object as its DOM / Ajax library, this is the property for you.
源码:
// For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
// the `$` ...
underscore的result
var object = {
cheese: 'crumpets',
stuff: function(){
return "nonsense";
}
};
//crumpets
_.result(object,'cheese');
//nonsense
_.result(object,'stuff');
看出:
//如果对象 object 中的属性 property 是函数, 则调用它, 否则, 返回它对应的valu ...
本文来自:http://www.infoq.com/cn/news/2013/04/backbone.js-1.0
依赖:
依赖underscore
视图和路由依赖jquery或者zepto
contains
//Returns true if the value is present in the list. Uses indexOf internally, if list is an Array.
_.contains(list,value)
举例:
//true
_.contains([1,2,3,4],4);
有时候,我们需要切换到对应国家的语言,来模拟当地用户chrome方法:
https://support.google.com/chrome/answer/95416?hl=zh-Hans
clean-css:
css minifier for node.js
npm install clean-css
//old
var minimized = CleanCSS.process(source,options);
//new
var minimized = new CleanCSS(options).minify(source);
processImport
是否process @import的规则
记录几个uglify的配置参数:
uglify: {
options : {
beautify: true,
mangle: false
}
}
mangle — pass false to skip mangling names.
不混淆变量名
https://github.com/mishoo/UglifyJS2
http://www.cnblogs.com/artwl/p/3449 ...
Browser-Sync:
http://www.alloyteam.com/2014/02/browser-sync-responsive-web-development-and-debugging-tool/
https://github.com/shakyshane/grunt-browser-sync
http://www.browsersync.io/
CSS 之 counter-increment
设置某个选择器每次出现的计数器增量,默认增量为1
http://www.w3school.com.cn/cssref/pr_gen_counter-increment.asp
Teddy:
https://github.com/kethinov/teddy
http://www.oschina.net/p/teddy
.npmignore是干嘛的?
https://www.npmjs.org/doc/developers.html#Keeping-files-out-of-your-package
https://www.npmjs.org/doc/json.html
You can also provide a ".npmignore" file in the root of your package, which will keep files from being included, even if they would be picke ...
TweenMax:
在线调用:http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js
node的process模块
process.argv
返回一个数组:
第一个是node
第二个是js文件名
下面就是命令行添加的参数
process.cwd
返回当前进程的工作目录
process.version
返回NODE_VERSION属性,返回值和node -v返回一样
process.versions
返回node的版本和它的依赖版本
process.pid
返回进程的pid属性
process.arch
返回处理 ...
@mixin triangle($direction,$size,$borderColor) {
content: "";
height: 0;
width: 0;
@if $direction == left {
border-right: $size solid $borderColor;
border-top: $size solid transparent;
border-bottom: $size solid tra ...