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
//scroll to top, hide address bar on mobile devices - 1 for android, 0 for the rest | |
(function( win ){ | |
var doc = win.document; | |
// If there's a hash, or addEventListener is undefined, stop here | |
if( !location.hash || !win.addEventListener ){ | |
//scroll to 1 | |
window.scrollTo( 0, 1 ); | |
var scrollTop = 1, |
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
<html> | |
<head> | |
<title>Place Engine Test</title> | |
</head> | |
<body> | |
<a href="#" id="clear">Clear markers</a><br /> | |
<div id="map" style="width:100%;height:600px;"> | |
</div> |
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
a[href^="http:"] { | |
display:inline-block; | |
padding-right:14px; | |
background:transparent url(/Images/ExternalLink.gif) center right no-repeat; | |
} | |
a[href^="mailto:"] { | |
display:inline-block; | |
padding-left:20px; | |
line-height:18px; | |
background:transparent url(/Images/MailTo.gif) center left no-repeat; |
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
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
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
// overriding sync to use local storage when possible | |
sync : function(method, model, options){ | |
var key, now, timestamp, refresh; | |
if(method === 'read' && this.constants.isStoredInLocalStorage) { | |
// only override sync if it is a fetch('read') request | |
key = this.getKey(); | |
if(key) { | |
now = new Date().getTime(); | |
timestamp = $storage.get(key + ":timestamp"); | |
refresh = options.forceRefresh; |
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
try { | |
module.$localStorage[key] = serializer(value); | |
} catch(e) { | |
if(e.name === 'QUOTA_EXCEEDED_ERR') { | |
// reset to make space | |
module.reset(); | |
module.$localStorage[key] = serializer(value); | |
} else { | |
module.localStorageAvailable = false; | |
$log.error("Local storage write failure - " + e); |
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.support.transition | |
// to verify that CSS3 transition is supported (or any of its browser-specific implementations) | |
$.support.transition = (function(){ | |
var thisBody = document.body || document.documentElement, | |
thisStyle = thisBody.style, | |
support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined; | |
return support; | |
})(); |
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
<?php | |
/** | |
* Is the current page a descendent of page identified by the path (not slug). | |
* A page is not a descendent of itself! | |
* @link http://wordpress.stackexchange.com/questions/101213/does-is-child-exist-in-wp-3-5-1 | |
* @param string $page_path The path of the page, e.g. mypage/mysubpage | |
* @return boolean True if current page is a descednent of specified $page_path. False otherwise. | |
*/ | |
function is_descendent_of( $page_path ){ |