摘要:
$.map function will return the modifies array. $.each function will not new a new array, the old value will still be the same. detach() funciton will 阅读全文
摘要:
#self aside li{ list-style-type: none;padding:5px;border-bottom: 1px solid #ccc;} #self aside li:last-child{border:0;} To remove last li's border; 阅读全文
摘要:
Important things to remember: 1. Usually, we create Collection, CollectionViews, Model, View. Collection <--> CollectionViews Moel <--> View 2. Applic 阅读全文
摘要:
Let's take a closer look at how a browser retrieves and acts on scripts.modern browser can parallel downloading 6 files(style sheets && images)at a ti 阅读全文
摘要:
/** Improve you loop code */ var treasureChest = { goldCoins: 10000, magicalItem : "Crown of Speed", necklaces: ["ruby", "pearl", "sapphire", "diamond 阅读全文
摘要:
Refactor the spacing between <header>, <article>, and <aside> so that elements will have a 20px margin above and below, regardless of their order on t 阅读全文
摘要:
/** Ternary Conditionals */ // //**Bad** // var isArthur = false; var weapon; if(isArthur){ weapon = "Excalibur"; }else{ weapon = "Longsword"; } // // 阅读全文
摘要:
Sometime, use can rewrite the toString , valueOf method to make those function more useful: For exmaple, we can make valueOf() function to calcualte t 阅读全文
摘要:
function Fencepost (x, y, postNum){ this.x = x; this.y = y; this.postNum = postNum; this.connectionsTo = []; } Fencepost.prototype = { sendRopeTo: fun 阅读全文
摘要:
You can add prototype to any object in Jacascript likes Object, Array, String... prototype 有继承的作用,比如说我有一个String的对象,我可以访问Object的prototype hasPrototype( 阅读全文