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
.grid-overlay:before { | |
content: ""; | |
position: fixed; | |
background-color: rgba(34,102,153,0.5); | |
background: -webkit-linear-gradient(skyblue 2px, transparent 2px), -webkit-linear-gradient(0, skyblue 2px, transparent 2px), -webkit-linear-gradient(skyblue 1px, transparent 1px), -webkit-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -moz-linear-gradient(skyblue 2px, transparent 2px), -moz-linear-gradient(0, skyblue 2px, transparent 2px), -moz-linear-gradient(skyblue 1px, transparent 1px), -moz-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -o-linear-gradient(skyblue 2px, transparent 2px), -o-linear-gradient(0, skyblue 2px, transparent 2px), -o-linear-gradient(skyblue 1px, transparent 1px), -o-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -ms-linear-gradient(skyblue 2px, transparent 2px), -ms-linear-gradient(0, skyblue 2px, transparent 2px), -ms-linear-gradient(skyblue 1px, transparent 1px), -ms-linear-gradient(0, skyblue 1px, transparent 1px); | |
background |
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 output = ''; | |
$('.contentblock').each(function(){ | |
var heading = $(this).find('h2').text(); | |
var article_heading_h3 = $(this).find('h3 a').text(); | |
var article_heading_h3_link = $(this).find('h3 a').attr('href'); | |
var article_heading_h4 = $(this).find('h4 p a').text(); |
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
Need to include Modernizer (http://www.modernizr.com/) and jQuery (http://jquery.com/) | |
$(document).ready(function($){ | |
if (Modernizr.localstorage) { | |
$('#hide-button').click(function(e){ | |
localStorage.setItem('subscribed',true); | |
$('#sign-up-form,#hide-button').hide(); | |
$('#hide-button').hide(); |
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
<script> | |
Modernizr.load([{ | |
// Does the browser support @font-face? | |
test: Modernizr.fontface, // Should return a boolean | |
// Yep! Get the fonts | |
yep : 'http://use.typekit.com/rndmstr1ng.js', | |
complete: function() { | |
// Load complete! Tell Typekit to start up | |
try { Typekit.load(); } catch(e) {}; | |
// Profit! |
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
<h1>Contact</h1> | |
<form action="#" method="post"> | |
<div> | |
<label for="name">Text Input:</label> | |
<input type="text" name="name" id="name" value="" tabindex="1" /> | |
</div> | |
<div> | |
<h4>Radio Button Choice</h4> | |
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
//Finds the text 'pancakes' in .food and wraps it with a span which has the sauce class. YUMMY! | |
$('.food:contains(pancakes)').each(function(){ | |
$(this).html( | |
$(this).html().replace('pancakes','<span class=\'sauce\'>pancakes</span>') | |
); | |
}); |
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
//Code for overloading the :contains selector to be case insensitive: | |
//Without the overload on the :contains selector jquery would normaly only underline the second line | |
// New selector | |
jQuery.expr[':'].Contains = function(a, i, m) { | |
return jQuery(a).text().toUpperCase() | |
.indexOf(m[3].toUpperCase()) >= 0; | |
}; | |
// Overwrites old selecor |
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
// Alpha blending | |
@function blend($bg, $fg) { | |
$r: red($fg) * alpha($fg) + red($bg) * (1 - alpha($fg)); | |
$g: green($fg) * alpha($fg) + green($bg) * (1 - alpha($fg)); | |
$b: blue($fg) * alpha($fg) + blue($bg) * (1 - alpha($fg)); | |
@return rgb($r, $g, $b); |
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 | |
function myfeed_request($qv) { | |
if (isset($qv['feed']) && !isset($qv['post_type'])) | |
$qv['post_type'] = array('post', 'snippets'); | |
return $qv; | |
} | |
add_filter('request', 'myfeed_request'); | |
?> |
OlderNewer