Skip to content

Instantly share code, notes, and snippets.

View browserify-test-command
$ browserify -r a -r b -r ./my-file.js:c > bundle.js
View geolocation.html
<p>Click the button to get your coordinates.</p>
<button onclick="getLocation()">Try It</button>
<button onclick="showError()">Show Error</button>
<p id="demo"></p>
<div id="mapholder"></div>
<script>
var x = document.getElementById("demo");
View Offer
<div itemscope itemtype="http://schema.org/Offer">
<span itemprop="name">Blend-O-Matic</span>
<span itemprop="price">$19.95</span>
<div itemprop="reviews" itemscope itemtype="http://schema.org/AggregateRating">
<img src="four-stars.jpg" />
<meta itemprop="ratingValue" content="4" />
<meta itemprop="bestRating" content="5" />
Based on <span itemprop="ratingCount">25</span> user ratings
</div>
</div>
View css-selection.css
::-moz-selection { color: #000; background: #DBB42D; }
::-webkit-selection { color: #000; background: #DBB42D; }
::selection { color: #000; background: #DBB42D; }
@yuguo
yuguo / 1.js
Created Apr 12, 2012
单例模式
View 1.js
(function(){
var name = 'Chris';
var age = '34';
var status = 'single';
function createMember(){
// [...]
}
function getMemberDetails(){
// [...]
}