Skip to content

Instantly share code, notes, and snippets.

View morganisok's full-sized avatar

Morgan Kay morganisok

View GitHub Profile
@juanbrujo
juanbrujo / equalHeight.js
Created January 9, 2015 03:23
equalHeight: get the higher and resize the sibling HTML elements using CSS
/**
* Columns Equal Height
* http://css-tricks.com/equal-height-blocks-in-rows/
* USE: equalHeight(elements);
*/
equalHeight = function(container){
var currentTallest = 0,
currentRowStart = 0,
rowDivs = new Array(),
$el,
@elusiveunit
elusiveunit / esrjl-editor-styles-refresh.php
Last active November 19, 2017 12:28
WordPress editor style cache refresh plugin
<?php
/**
* Plugin Name: Editor Styles Refresh
* Plugin URI: https://gist.github.com/elusiveunit/f0f728771de6647778fa
* Description: Adds file time query string to theme editor style URLs, to force cache busting when the file is changed.
* Author: Jens Lindberg
* Version: 0.1
* License: GPL-2.0+
*/
$('form :input').each(function(index, elem) {
var eId = $(elem).attr('id');
var label = null;
if (eId && (label = $(elem).parents('form').find('label[for='+eId+']')).length === 1) {
$(elem).attr('placeholder', $(label).html());