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
<!DOCTYPE html> | |
<head> | |
<title>Pusher Test</title> | |
<script src="http://js.pusher.com/1.12/pusher.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// Enable pusher logging - don't include this in production | |
Pusher.log = function(message) { | |
if (window.console && window.console.log) window.console.log(message); | |
}; |
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
dave@STUDLIO /c/inetpub/apache/trash | |
$ bower install sizzle | |
cygwin warning: | |
MS-DOS style path detected: C:\Users\dave\AppData\Roaming\npm/node | |
Preferred POSIX equivalent is: /c/Users/dave/AppData/Roaming/npm/node | |
CYGWIN environment variable option "nodosfilewarning" turns off this warning. | |
Consult the user's guide for more details about POSIX paths: | |
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames | |
bower cloning git://github.com/jquery/sizzle.git | |
bower caching git://github.com/jquery/sizzle.git |
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
jQuery.fn.offset = function( options ) { | |
if ( arguments.length ) { | |
return options === undefined ? | |
this : | |
this.each(function( i ) { | |
jQuery.offset.setOffset( this, options, i ); | |
}); | |
} | |
var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, |
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
/*! | |
* jQuery JavaScript Library v@VERSION | |
* http://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* | |
* Copyright 2012 jQuery Foundation and other contributors | |
* Released under the MIT license. | |
* http://jquery.org/license |
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 debugAccess(obj, prop, debugGet){ | |
var origValue = obj[prop]; | |
Object.defineProperty(obj, prop, { | |
get: function () { | |
if ( debugGet ) | |
debugger; | |
return origValue; | |
}, |
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
test("clone() attributes are independent (#9777)", function () { | |
expect(1); | |
var attrName = "quack", | |
orig = jQuery( '<button>hi</button>' ).appendTo( "#qunit-fixture" ), | |
clone1 = orig.clone().attr( attrName, "clone1" ).appendTo( "#qunit-fixture" ), | |
clone2 = clone1.clone().attr( attrName, "clone2" ).appendTo( "#qunit-fixture" ); | |
equal( clone1.attr(attrName), "clone1", "First clone's attr is unmolested" ); | |
}); |
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
fetchCurrentPosition() | |
.then(updateLocationDisplay) | |
.pipe(fetchWeatherAtThisLocation) | |
.then(updateWeatherDisplay) | |
.pipe(determineWeatherType) | |
.then(updateRecommendations) | |
.then(updateAppTile); | |
function fetchCurrentPosition() | |
{ |
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
(new Windows.Devices.Geolocation.Geolocator()).getGeopositionAsync().then(function(pos){ | |
// If lat/lon not available, just use a default | |
pos = pos || { coordinate: { latitude: 39, longitude: 76, accuracy: 42 } }; | |
$("#latlon").text( | |
"lat=" + pos.coordinate.latitude + ", lon=" + pos.coordinate.longitude + | |
", accuracy=" + pos.coordinate.accuracy+ | |
", addr=" + (pos.civicAddress.city || pos.civicAddress.state || pos.civicAddress.postalCode) | |
); |
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
var originalEvent = event, | |
propHook = jQuery.event.propHooks[ event.type ], | |
copy = props; | |
event = jQuery.Event( originalEvent ); | |
// propHook can return an array of props to copy | |
if ( propHook ) { | |
copy.concat( propHook( event, originalEvent) || [] ); | |
} |
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
var originalEvent = event, | |
propHook = jQuery.event.propHooks[ event.type ]; | |
event = jQuery.Event( originalEvent ); | |
// If hook returns false, it doesn't want anything else done | |
if ( propHook && propHook( event, originalEvent ) === false ) { | |
return event; | |
} |