Skip to content

Instantly share code, notes, and snippets.

View elliottmangham's full-sized avatar
🤓

Elliott Mangham elliottmangham

🤓
View GitHub Profile
@vegaskev
vegaskev / functions.php
Created July 20, 2018 22:05
Change Gravity Forms Spinner to CSS Spinner
// Changes Gravity Forms Ajax Spinner (next, back, submit) to a transparent image
// this allows you to target the css and create a pure css spinner like the one used below in the style.css file of this gist.
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 );
function spinner_url( $image_src, $form ) {
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder
}
@junkycoder
junkycoder / reboot.css
Created August 24, 2016 15:24
Bootstrap reboot.scss rewritten in pure CSS
/**
* Global styles based on Reboot.css
* http://v4-alpha.getbootstrap.com/content/reboot/
* https://github.com/twbs/bootstrap/blob/v4-dev/scss/_reboot.scss
*/
/*
Reset the box-sizing
Change from `box-sizing: content-box` to `border-box` so that when you add
@senlin
senlin / language-independent-acf-theme-options-output.php
Last active March 13, 2024 16:00
How to get language independent ACF theme options on a WPML site
<?php
/**
* To get this to work, you need to tinker with the acf/settings/ filter and reset the default language
* so that the get_field() function returns the correct results even when not on the default language.
*
* You can add the filter before you call the get_field() function and then call it again with the current
* language to reset it again, so it will affect other pages.
*
* answer courtesy of James of ACF Support
*/
@fieldoffice
fieldoffice / sub-menu-wrap
Last active January 26, 2023 15:03
Wordpress - add div wrapper around sub-menu
/* EXTEND SUBNAV
******************************************/
class submenu_wrap extends Walker_Nav_Menu {
function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<div class='sub-menu-wrap'><ul class='sub-menu'>\n";
}
function end_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
@isramv
isramv / jQuery check if empty input add class
Last active June 14, 2022 23:37
Check if input has a value add and remove class jQuery
$('input#edit-keys-1').blur(function(){
tmpval = $(this).val();
if(tmpval == '') {
$(this).addClass('empty');
$(this).removeClass('not-empty');
} else {
$(this).addClass('not-empty');
$(this).removeClass('empty');
}
});
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………