This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
alert('hello,this is a gist test!'); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI().use('yql', function(Y) { | |
Y.YQL('select * from weather.forecast where location=90210', function(r) { | |
var results = r.query.results | |
//results就是你所关心的数据 | |
//现在你可以用它做任何事情 | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media (max-width: 1440px) { | |
.layout .grid { | |
width: 1190px; | |
} | |
.sidebar { | |
float: left; | |
} | |
.sidebar li { | |
display: block; | |
vertical-align: bottom; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!Array.prototype.hello) { | |
Array.prototype.hello = function () {}; | |
} | |
var arr = ['a', 'b', 'c']; | |
for (var k in arr) { | |
console.log(k + ' : ' + arr[k]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.w990, | |
.w952, | |
.screen, | |
.layout-col .grid, | |
#alibar-v4 .alibar-container, | |
#footer div#footer-v0 { | |
width: 990px; | |
} | |
.arrow-r { | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add commas to a number every 3 digits | |
function formatNum1(num) { | |
var STEP = 3; | |
var DELIMITER = ','; | |
var str = '' + num; | |
var arr = str.split(''); | |
var len = arr.length; | |
for(var i = len - STEP; i > 0; i -= STEP) { |