Skip to content

Instantly share code, notes, and snippets.

(function(d) {
d.html5 = {};
d.html5.version = "6.11.4923";
d = d.utils.css;
var k = " div span a img ul li video".split(" ").join(", .jwplayer ");
d(".jwplayer ".slice(0, -1) + k + ", .jwclick", {
margin: 0,
padding: 0,
border: 0,
color: "#000000",
@zachdrago
zachdrago / js.js
Created July 20, 2016 19:52
NOOSA 6 columns
Callbacks.prototype.onBeforeRenderIsotope = function(containerWidth, maxTileWidth, margin, numColumns, currentTileWidth, tile) {
var $tile = $(tile);
var columns = 2;
if (containerWidth >= 900) {
columns = 6;
}
window.displayColumns = columns;
return {
tileWidth: Math.floor(((containerWidth - margin) / columns) - margin),
numColumns: columns
@zachdrago
zachdrago / keybind.js
Created July 13, 2016 11:29
Hotwire Presentation - key binding JS
$('html').keyup(function(event){
if (event.keyCode === 37) {
alert('right');
$('.stacklapopup-arrow-left').click();
}
});
$('html').keyup(function(event){
if (event.keyCode === 39) {
alert('left');
@zachdrago
zachdrago / error.html
Created June 2, 2016 23:28
WP - DRM Docs
<script type="text/html" class="claim-template">
<div class="message error text-center">
<img src="http://static.zennioptical.com/image/site/errorPages/page404/error404.jpg" style="padding-top: 120px;" />
<h1 class="st-title st-title-h1"><span class="fs fs-close"></span>We were unable to find the page you were looking for.</h1>
<h2> Looks like we may need a new pair of eyeglasses. </h2>
<p>
We couldn't find any matching posts
{{#claimData.source_username}}
@zachdrago
zachdrago / Custom CSS - Font.css
Last active May 12, 2016 19:04
WFU Event - lower 3rd
.tile {
font-family: serif;
font-size: 14px;
color: #333333;
}
@zachdrago
zachdrago / Widget Test.html
Last active May 24, 2016 00:29
Tourism New Brunswick
<div class="stackla-widget" data-filter="18785" data-tags="111627;112876" data-tags-grouped-as="OR" data-id="9147" data-hash="572d0965e7f56" data-ct="" data-alias="tourism-new-brunswick.stackla.com" data-ttl="30" style="width: 100%; overflow: hidden;"></div>
<script type="text/javascript">
(function (d, id) {
if (d.getElementById(id)) return;
var t = d.createElement('script');
t.type = 'text/javascript';
t.src = '//assetscdn.stackla.com/media/js/widget/fluid-embed.js';
t.id = id;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(t);
}(document, 'stackla-widget-js'));
@zachdrago
zachdrago / CustomCSS.css
Created May 2, 2016 23:51
Ad Council - Widget Hover
body {
font-family: sans-serif;
font-weight: 300;
}
.tile {
box-shadow: none !important;
}
.tile:hover {
@zachdrago
zachdrago / ADB.html
Created April 27, 2016 20:22
SFAussies widgets
<div class="stackla-widget" data-id="7294" data-hash="56aaafd0ecadd" data-ct=""
data-alias="sfaussies.stackla.com" data-ttl="30" style="width: 100%; overflow: hidden;"></div>
<script type="text/javascript">
(function (d, id) {
if (d.getElementById(id)) return;
var t = d.createElement('script');
t.type = 'text/javascript';
t.src = '//assetscdn.stackla.com/media/js/widget/fluid-embed.js';
t.id = id;
@zachdrago
zachdrago / FA-icons.css
Last active April 29, 2016 22:50
JF Griffing - 2 tile layout o mobile
.fs-triangle-up:before {
content: "\f18f"
}
@zachdrago
zachdrago / CustomJS-Widget.js
Created April 21, 2016 19:05
Amplify Custom Fileds
$.extend(Callbacks.prototype, {
onCompleteJsonToHtml: function (tileObject, t) {
var newTile = $("<div class='content'></div>");
try {
var messageJson = JSON.parse(t.message);
} catch( ex ) {
var messageJson = {
"comment": t.message,
"suburb": "",
"state": ""