Skip to content

Instantly share code, notes, and snippets.

View jawinn's full-sized avatar

Josh Winn jawinn

View GitHub Profile
@jawinn
jawinn / toast.js
Created March 23, 2014 20:28 — forked from kamranzafar/toast.js
jQuery Mobile - Toast-style popup, modified
// JQuery Mobile Android-style Toast popup
// https://gist.github.com/kamranzafar/3136584
// Usage: toast("Your Message Here");
var toast = function(msg){
$("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h4>"+msg+"</h4></div>")
.css({ display: "block",
opacity: 0.96,
"background-color": "#332C2C",
"z-index":"9999",
position: "fixed",
@jawinn
jawinn / gist:5762804
Last active December 18, 2015 09:39 — forked from bitfade/gist:4555047
Remove empty paragraph tags and extraneous BRs from shortcodes. List shortcodes on line 8.
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));
// opening tag