To be or not to be.That is a question!

---源于莎士比亚的《哈姆雷特》

导航

2013年6月8日 #

Backbone 学习5

摘要: (function($){ Backbone.sync = function(method, model, success, error){ success(); } var Item = Backbone.Model.extend({ defaults: { part1: 'hello', part2: 'world' } }); var List = Backbone.Collection.extend({ model: Item }); var ItemView = Backbone.View.extend({ tagNam... 阅读全文

posted @ 2013-06-08 23:46 Ijavascript 阅读(202) 评论(0) 推荐(0) 编辑

Backbone 学习4

摘要: (function($){ var Item=Backbone.Model.extend({ defaults:{ part1:"hello", part2:"world" } }); var List=Backbone.Collection.extend({ model:Item }); var ItemView=Backbone.View.extend({ tagName:'li', initialize:function(){ ... 阅读全文

posted @ 2013-06-08 23:16 Ijavascript 阅读(224) 评论(0) 推荐(0) 编辑

Backbone 学习3

摘要: (function($){ var Item=Backbone.Model.extend({ defaults:{ part1:"hello", part2:"world" } }) var List=Backbone.Collection.extend({ model:Item }) var ListView=Backbone.View.extend({ el:$("body"), events:{ "click button#... 阅读全文

posted @ 2013-06-08 13:31 Ijavascript 阅读(186) 评论(0) 推荐(0) 编辑

Backbone 学习2

摘要: (function($){ var ListView=Backbone.View.extend({ el:$("body"), events:{ "click button#add":"addItem" }, initialize:function(){ _.bindAll(this,"render","addItem"); this.counter=0; this.render(); }, render:functi... 阅读全文

posted @ 2013-06-08 10:20 Ijavascript 阅读(215) 评论(0) 推荐(0) 编辑

Backbone 学习1

摘要: <!DOCTYPE HTML><html dir="ltr" lang="zh-CN"><head> <meta charset="utf-8"> <title></title> <script type="text/javascript" src="lib/jquery.js"></script> <script type="text/javascript" src=&qu 阅读全文

posted @ 2013-06-08 09:55 Ijavascript 阅读(162) 评论(0) 推荐(0) 编辑