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
<?php if (has_post_thumbnail( $post->ID ) ): ?> | |
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> | |
<div class="bgImg" style="background:url(<?php echo $image[0]; ?>) no-repeat 50% 50%;"></div> | |
<?php endif; ?> |
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
// load twitter | |
(function() { | |
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | |
po.src = 'http://platform.twitter.com/widgets.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | |
})(); |
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
// load facebook | |
(function() { | |
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | |
po.src = 'http://connect.facebook.net/en_US/all.js#xfbml=1'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | |
})(); |
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
// load google plus | |
(function() { | |
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | |
po.src = 'https://apis.google.com/js/plusone.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | |
})(); |
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() { | |
var tabContent = $(".tab_content"); | |
// Modified tutorial's code for this | |
var tabs = $("ul#tabsNav li"); | |
var hash = window.location.hash; | |
tabContent.not(hash).hide(); | |
tabs.find('[href=' + hash + ']').addClass('active'); | |
tabs.click(function() { |
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; |
OlderNewer