-
Dynamically Attach Google Analytics Event Handler to File Download
Attaching to all attr pdf’s $( document ).ready(function() { //attach event dispatcher to all links that are pdf files //register event in analtyics $(‘a[href*=”.pdf”]’).click(function(e) { ga(‘send’, ‘event’, ‘PDF’, ‘download’, $(this).attr(‘href’), 1); }); });
-
Angularjs 1.4 connect to imgur topics api
Example Page Click the image to see the reverse image lookup from imgur to google images.
-
Simple jQuery Color Selector
I needed a lightweight color picker that was reusable, lightweight, dead simple to implement, and could be attached to any html element. Here’s what I came up with: DEMO
-
Javascript Count Up Timer With Hours, Minutes, and Seconds
Here is a script that takes a given time and increments each second to make it appear to update in realtime. Time given, must be in hh:mm:ss format and the div id must be realtime 12:12:12 12:12:12 Script that makes everything happen, needs jquery, but could be easily re-written in pure javascript. $(document).ready (function () […]