This is my implementation of a prefix tree that is used to give you autocompletion suggestions!
The dictionary has been prepopulated with approximately 5,000 common English words.
Find me at http://therobinkim.com/!
This is my implementation of a prefix tree that is used to give you autocompletion suggestions!
The dictionary has been prepopulated with approximately 5,000 common English words.
Find me at http://therobinkim.com/!
var gaForm = gaForm || {}; | |
jQuery(function($) { | |
var defaults = { | |
Forms:"#form", | |
Category:"analysisForm", | |
Action:"id", | |
inputRadio: true, | |
inputSelect: true, | |
inputCheckBox: true | |
}; |
$("form").on('submit', function(e) { | |
var form = this; | |
if (_gaq) { | |
e.preventDefault(); | |
_gaq.push(['_trackEvent', 'my category', 'my action']); | |
setTimeout(function() { form.submit(); }, 100); | |
return false; | |
} |
javascript: | |
/** | |
* простой букмарклет, который парсит фотки из http://www.kia.ua/ | |
*/ | |
(function () { | |
var a = document.querySelectorAll("#thumbs .thumbs .thumb"); | |
var docHeight = document.height; | |
/** | |
* Создаю фон прелоадера | |
* @type {*} |
/* Downloads tracking */ | |
jQuery(function() { | |
var dlr = /\.(?!html?|php)(\w{1,4})$/ | |
jQuery('a').click(function() { | |
var m | |
if (typeof(ga) == 'function' && (m = dlr.exec(this.href))) { | |
ga('send', 'event', 'download', m[1], this.href) | |
} | |
}) |
p{ | |
margin-bottom:20px; | |
} | |
p+p{ | |
text-indent:2em; | |
margin-top:-20px; | |
} |
jQuery(document).ready(function($){ | |
$('form').submit(function(event){ | |
//if analytics object exists | |
if(window._gat){ | |
event.preventDefault(); | |
optinForm = this; | |
_gaq.push(['_set','hitCallback', function(){ | |
optinForm.submit(); | |
}]); | |
_gaq.push(['_trackEvent', 'Forms', 'Submit', 'hbsanewtraffic']); |
// jQuery wrapper | |
var cacheQuery = function(query) { | |
this.cache = this.cache || {}; | |
if (!this.cache[query]) { | |
this.cache[query] = jQuery(query); | |
} | |
return this.cache[query]; | |
}; |
<?php | |
// track conversions in Gravity Forms | |
function add_conversion_tracking_code($button, $form) { | |
$dom = new DOMDocument(); | |
$dom->loadHTML($button); | |
$input = $dom->getElementsByTagName('input')->item(0); | |
if ($input->hasAttribute('onclick')) { | |
$input->setAttribute("onclick","ga('send', 'click', 'submit');".$input->getAttribute("onclick")); | |
} else { |
function checkAnalytics () { | |
var ids = ga.getAll(); | |
var len = ids.length; | |
console.log('Universal Analytics'); | |
console.log('ids', ids); | |
console.log('======================================================='); | |
console.log('Number of Universal Analytics IDs found : ' + ids.length); | |
console.log('======================================================='); | |
console.log('Universal Analytics IDs'); | |
console.log('======================================================='); |