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
body { | |
font-size: 100%; | |
} | |
body, caption, th, td, input, textarea, select, option, legend, fieldset, h1, h2, h3, h4, h5, h6 { | |
font-size-adjust: 0.5; | |
} | |
#page { | |
font-size: 1em; |
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 | |
// Artist is custom field key for post | |
$key_songkick = "Artist"; | |
// Check post to see if Artist custom field exists | |
if ( get_post_meta($post->ID, $key_songkick, true) ) : | |
// Need to search by Artist name since we don't know ID, need ID to get the artist calendar. | |
// Using urlencode since we can't send a space to the Songkick JSON request | |
$Artist = urlencode(get_post_meta($post->ID, $key_songkick, true)); | |
// Use your API key here |
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 updateHeight() { | |
if (($(window).height()) > $("section:last-child").height()) { | |
$("section:last-child").css("padding-bottom", $(window).height() - ($("section:last-child").height() + $("#footer").height() + 30) + "px"); // adjust the number for extra padding depending upon your site | |
} else { | |
$("section:last-child").css("padding-bottom", "0px"); | |
} | |
} | |
// call on DOM load | |
updateHeight(); |
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
<style> | |
.accordion-button {cursor:pointer;} /* visual cue for user */ | |
.accordion-button.on { /* insert style for on state */ } | |
.accordion-content {display:none; overflow:hidden;} /* Hide on page load, overflow:hidden is to keep things from hopping around */ | |
.accordion-content.open {display:block;} /* allows to set one open on page load | |
</style> | |
<ul> | |
<li class="accordion-button">Title / heading here</li> | |
<li class="accordion-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam in nibh eget augue tincidunt elementum nec vel tellus. Fusce vestibulum dictum leo, ac varius nisi sagittis vel. Aenean sed est id arcu adipiscing semper eu vel mi. In bibendum est sit amet urna gravida vel hendrerit sapien pharetra.</li> |
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 top = $('#ID').offset().top - parseFloat($('#ID').css('margin-top').replace(/auto/, 0)); // math is there in case the element has margin-top and removes it | |
$(window).scroll(function (event) { | |
// what the y position of the scroll is | |
var y = $(this).scrollTop(); | |
// whether that's below the form | |
if (y >= top) { | |
// if so, ad the fixed class | |
$('#menu').addClass('fixed'); | |
} else { |
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
$(document).ready(function() { | |
$(".slide").click(function() { | |
$("html, body").animate({ | |
scrollTop: $($(this).attr("href")).offset().top + "px" | |
}, { | |
duration: 500, | |
easing: "swing" | |
}); | |
return false; | |
}); |
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 | |
class facebook_graph_json | |
{ | |
public function query($page_username) { | |
$url = file_get_contents('http://graph.facebook.com/'.$page_username); | |
$json = json_decode($url); | |
return array( | |
'page_name' => $json->name, | |
'page_id' => $json->id, | |
'page_url' => $json->link, |
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
getQueryParameters : function(str) { | |
return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0]; | |
} |