- 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
- Compass - Open source CSS Authoring Framework.
- Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
- Font Awesome - The iconic font designed for Bootstrap.
- Zurb Foundation - Framework for writing responsive web sites.
- SASS - CSS extension language which allows variables, mixins and rules nesting.
- Skeleton - Boilerplate for responsive, mobile-friendly development.
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// Place in footer | |
var mobilevideo = document.getElementsByTagName("video"); | |
var i; | |
for (i = 0; i < mobilevideo.length; i++) { | |
mobilevideo[i].setAttribute("playsinline", ""); | |
} | |
// Alternate, gets only the first video | |
var mobilevideo = document.getElementsByTagName("video")[0]; | |
mobilevideo.setAttribute("playsinline", ""); |
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
sudo find . -type f -exec chmod 664 {} + | |
sudo find . -type d -exec chmod 775 {} + | |
sudo chmod 660 wp-config.php |
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
$('.my-class').each(function(){ | |
var id = $(this).attr('id'); | |
scenes[scenes.length] = new ScrollMagic.Scene({triggerElement: '#'+id, duration: 0, triggerHook: 0.9, reverse: false}) | |
.setClassToggle('#'+id, "animate"); | |
}); |
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 my_acf_load_gravity_forms_select( $field ) { | |
// This feels slightly hacky, but it works. | |
// | |
// If your select field has the wrapper class "gravity-form-select", | |
// it will be intercepted and any values will be replaced by a list of | |
// your form IDs and Titles. | |
// | |
// You could choose to intercept a select field with a specific name or | |
// field key, but I prefer this method because you can use it on multiple |
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(function($){ | |
function truncateToEllipsis(textboxes) { | |
function doTruncate(containers) { | |
for (var i = 0; i < containers.length; i++) { | |
var cntnr = $(containers[i]); | |
// The original content for this textbox should be place in an attribute | |
// called "data-text". The script will modify the original content, so we |
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
// Menus are saved as terms, so get the term object first | |
$menu = get_term_by('name', 'Slideout Menu', 'nav_menu'); | |
// Get field as you would from a normal taxonomy term, in the format "term_XX" | |
$field = get_field( 'field_name', 'term_'.$menu->term_id); |
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
$browser-context: 16; | |
@function em($pixels, $context: $browser-context) { | |
@if (unitless($pixels)) { | |
$pixels: $pixels * 1px; | |
} | |
@if (unitless($context)) { | |
$context: $context * 1px; | |
} |
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
@mixin cover($pos:absolute,$inset:0px) { | |
position: $pos; | |
bottom: $inset; | |
left: $inset; | |
right: $inset; | |
top: $inset; | |
width: calc(100% - (#{$inset} * 2)); | |
height: calc(100% - (#{$inset} * 2)); | |
} |
OlderNewer