Skip to content

Instantly share code, notes, and snippets.

@coreyworrell
coreyworrell / placeholder-fix.js
Created March 25, 2011 22:52
Implements the input placeholder attribute for browsers that don't support it yet. Requires Modernizr.js
jQuery(function($) {
if ( ! Modernizr.input.placeholder) {
$(':input[placeholder]').each(function() {
var self = $(this);
var placeholder = self.attr('placeholder');
if ( ! self.val() || self.val() === placeholder) {
self.addClass('placeholder').val(placeholder);
}
@coreyworrell
coreyworrell / gist:1313678
Created October 25, 2011 18:06
JW Player - Stop other videos when playing
(function($) {
/**
* We have to get a collection of id's because the HTML5 player moves the DOM
* around and returns different elements when caching the selectors.
*/
var elements = $('.video-player > div, .video-player object'),
playerIds = [];
elements.each(function(i, player) {
playerIds.push(player.id);
@coreyworrell
coreyworrell / dabblet.css
Created January 15, 2012 03:41 — forked from anonymous/dabblet.css
Cool Border Whatchyamacallit
/**
* Cool Border Whatchyamacallit
*/
body {padding:100px 0;}
#test {position:relative; border:1px solid #333; border-width:1px 0; height:3px;}
#test:before {
content:'<>';
position:absolute;
top:50%;
left:50%;
@coreyworrell
coreyworrell / README.md
Last active July 28, 2017 20:18
Migrate ACF Link plugin data to ACF 5.6.0

Migrate ACF Link plugin data to ACF Pro 5.6.0

The new version of ACF Pro (5.6.0) adds a built-in link selector field. This makes the ACF Link plugin obsolete.

One problem though is that the ACF Link plugin saved the link's target value as a boolean (0 or 1), and ACF now saves it as an empty string ("") or as _blank.

Disclaimer

{
"basic": {
"license key": "***REMOVED SENSITIVE VALUE***",
"date": "Tue, 03 Oct 2017 00:51:01 +0000",
"ownCloud version": "10.0.3.3",
"ownCloud version string": "10.0.3",
"ownCloud edition": "Community",
"server OS": "Linux",
"server OS version": "Linux ***REMOVED SENSITIVE VALUE*** 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64",
"server SAPI": "apache2handler",