// jQuery
$(document).ready(function() {
// code
})
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 app = app || {}; | |
//object literal | |
app = { | |
init: function(){ | |
this.cache(); | |
this.bind(); | |
}, | |
cache: function(){ | |
this.anchor = $( 'a' ); |
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
data:text/html, | |
<title>DoJS</title> | |
<style type="text/css"> | |
#e{position:absolute;top:0;right:0;bottom:0;left:0;} | |
</style> | |
<div id="e"></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
<ul class="last-posts"> | |
<?php | |
$args = array( 'numberposts' => 3 ); | |
$lastposts = get_posts( $args ); | |
foreach($lastposts as $post) : setup_postdata($post); ?> | |
<li class='last-posts__post'> | |
<?php | |
if ( has_post_thumbnail() ) { | |
the_post_thumbnail('thumbnail', array('class' => 'last-posts__post-img')); | |
} |
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
<?php | |
// Recent Posts | |
function recent_posts($atts){ | |
$q = new WP_Query( | |
array( 'orderby' => 'date', 'posts_per_page' => '4') | |
); | |
$list = '<ul class="recent-posts">'; |
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
// Source: http://ianstormtaylor.com/oocss-plus-sass-is-the-best-way-to-css/ | |
// Sass | |
%separator | |
border-top: 1px solid black | |
hr | |
@extend %separator | |
.separator | |
@extend %separator |
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 app = app || {}; | |
//object literal | |
app = { | |
init: function(){ | |
this.cache(); | |
this.bind(); | |
}, | |
cache: function(){ | |
this.anchor = $( 'a' ); |
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 s, | |
app = { | |
settings: { | |
numArticles: 5, | |
articleList: $("#article-list"), | |
moreButton: $("#more-button") | |
}, | |
init: function() { |
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
<html> | |
<body style="padding:0; margin:0;"> | |
<!-- reloader.html --> | |
<iframe id=reloader src="/" style="margin:0;border:none;padding:0;height:100%;width:100%"></iframe> | |
<script> | |
(function test() { | |
document.getElementById('reloader').src = document.getElementById('reloader').src; | |
setTimeout(test, 500); // 500ms = 1/2 second | |
})(); | |
</script> |
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
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |