Skip to content

Instantly share code, notes, and snippets.

View magnificode's full-sized avatar
👹

Dominic Magnifico magnificode

👹
View GitHub Profile
// Vanilla version of FitVids
// Still licencened under WTFPL
//
// Not as robust and fault tolerant as the jQuery version.
// It's BYOCSS.
// And also, I don't support this at all whatsoever.
;(function(window, document, undefined) {
'use strict';
— you might not need jQuery
> http://youmightnotneedjquery.com/
— Go Make Things
> http://gomakethings.com/ditching-jquery-for-vanilla-js/
> http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
— ids & classes, together at last
> <div class="header-notification" id="header-notification"></div>
@jonathantneal
jonathantneal / customizer.css
Last active February 17, 2016 07:13
Updating Customizer from the preview itself
[data-customize-text]:hover, [data-customize-text]:focus {
border-radius: 2px;
outline: none;
}
[data-customize-text]:hover {
background-color: rgba(0,155,255,.125);
box-shadow: inset 0 0 5px 0 rgba(0,155,255,.25), 0 0 5px 0 rgba(0,155,255,.25);
cursor: pointer;
}
<?php
/*
Plugin Name: Custom Post Type Archive Menu Links
Plugin URI: http://codeseekah.com/2012/03/01/custom-post-type-archives-in-wordpress-menus-2/
Description: Easily Add Custom Post Type Archives to the Nav Menus
Version: 1.1
Author: soulseekah
Author URI: http://codeseekah.com
License: GPL2
@wpsmith
wpsmith / wps_enqueue_jquery.php
Last active March 19, 2018 20:55
PHP: Enqueue Google CDN jQuery with fallback to WordPress
<?php
add_action( 'wp_enqueue_scripts', 'wps_enqueue_jquery' );
/**
* Enqueue jQuery from Google CDN with fallback to local WordPress
*
* @link http://codex.wordpress.org/Function_Reference/wp_enqueue_script
* @link http://codex.wordpress.org/Function_Reference/wp_register_script
* @link http://codex.wordpress.org/Function_Reference/wp_deregister_script
* @link http://codex.wordpress.org/Function_Reference/get_bloginfo
* @link http://codex.wordpress.org/Function_Reference/is_wp_error
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active June 14, 2024 17:42
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com).

Contents

@mfkp
mfkp / index.html
Created December 17, 2011 01:39
mailchimp ajax signup form example
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script>
</head>
<body>
<div id="email">
<span>Enter your email to sign up</span>
<form action="/subscribe.php" id="invite" method="POST">