This file contains hidden or 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
( ( logger, $ ) -> | |
logContainer = null | |
write = ( msg ) -> logContainer.append "<p>#{ msg }</p>" | |
logger.init = ( el ) -> logContainer = el | |
logger.log = ( msg ) -> write msg | |
) window.logger = window.logger || {}, jQuery |
This file contains hidden or 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
var restaurant = (function($) { | |
var pub = {}, | |
menu = [ "(pi)", "(^)" ], | |
drinks = [ "(coffee)", "(beer)", "(d)" ]; | |
pub.eat = function(call) { | |
if ( call === "(pi)" ) { | |
console.log( "(happy)" ); | |
} else if ( call === "(^)" ) { | |
console.log( "(party)" ); |
This file contains hidden or 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
<div id="dialog-modal">Hello World</div> |
This file contains hidden or 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
<div id="dialog-modal">Hello World</div> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script class="jsbin" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> |
This file contains hidden or 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
<ul id="members" data-role="listview" data-filter="true"> | |
<!-- ... more list items ... --> | |
<li> | |
<a href="detail.html?id=10"> | |
<h3>John Resig</h3> | |
<p><strong>jQuery Core Lead</strong></p> | |
<p>Boston, United States</p> | |
</a> | |
</li> | |
<!-- ... more list items ... --> |
This file contains hidden or 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
emailPattern = /// ^ #begin of line | |
([\w.-]+) #one or more letters, numbers, _ . or - | |
@ #followed by an @ sign | |
([\w.-]+) #then one or more letters, numbers, _ . or - | |
\. #followed by a period | |
([a-zA-Z.]{2,6}) #followed by 2 to 6 letters or periods | |
$ ///i #end of line and ignore case | |
if "[email protected]".match emailPattern | |
console.log "E-mail is valid" |
This file contains hidden or 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
<ul id="menu"> | |
<li><a href="#">Browsers</a> | |
<ul> | |
<li><a href="#">Firefox</a></li> | |
<li><a href="#">Google Chrome</a></li> | |
<li><a href="#">Internet Explorer</a></li> | |
<li><a href="#">Opera</a></li> | |
<li><a href="#">Safari</a></li> | |
</ul> | |
</li> |
This file contains hidden or 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
<ul id="menu"> | |
<li><a href="#">Browsers</a> | |
<ul> | |
<li><a href="#">Firefox</a></li> | |
<li><a href="#">Google Chrome</a></li> | |
<li><a href="#">Internet Explorer</a></li> | |
<li><a href="#">Opera</a></li> | |
<li><a href="#">Safari</a></li> | |
</ul> | |
</li> |
This file contains hidden or 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
label.error { | |
color: red; | |
font-size: 16px; | |
font-weight: normal; | |
line-height: 1.4; | |
margin-top: 0.5em; | |
width: 100%; | |
float: none; | |
} |