Jake Paris

Notebook

tagged with snippet

MARC Record to JSON Converter

Easily convert your MARC records into JSON format, which is compatible with most modern APIs and other thingamabobers.

SASS Mixins

Animations @mixin keyframes($name) { @-ms-keyframes #{$name} { @content } @-o-keyframes #{$name} { @content } @-moz-keyframes #{$name} { @content } @-webkit-keyframes #{$name} { @content } @keyframes #{$name} { @content } } @mixin animation($val) { msanimation…

Fade-in text: jQuery plugin

This is a basic plugin for jQuery which adds an effect for slowly fading in text. There may be other plugins out there that have similar functionality, but this was an attempt to try…

GET Query Params with Javascript

var parseQueryParameters = function(){ var queryString = window.location.search; var queries = {}; if(queryString=='') return queries; var q = queryString.replace('?','').split('&'); q.forEach(function(pair,index){ var a = pair.split('='); if(typeof a[1]==='undefined') a.push(''); queries[a[0]] = a[1]; }); return queries;…

Shortcode to Use a WordPress widget in Page Content

A small snippet creating a shortcode which will display any widget.

Helper function (in vanilla js) to find a GET query parameter

var parseQueryParameters = function(){ var queryString = window.location.search; var queries = {}; if(queryString=='') return queries; var q = queryString.replace('?','').split('&'); q.forEach(function(pair){ var a = pair.split('='); if(typeof a[1]==='undefined') a.push(''); queries[a[0]] = a[1]; }); return queries;…

Using AJAX in WordPress

Most of the work of setting up an ajax action in the WordPress environment happens in php-land. The PHP File Register & enqueue your script. In this example, I’ll assume the script has already…