Files
aowow/static/js/home.js
Sarjuuk b6e1bcaeac Setup/Tracking
* added tracking code for Google Analytics
   - enabling is optional
   - add account in config to enable tracking
 * removed usage tracking
   - the results were just seriously depressing..
2015-10-20 00:38:48 +02:00

23 lines
770 B
JavaScript

$(document).ready(function () {
Menu.addButtons($('#home-menu'), mn_path);
var form = $('#home-search form');
form.submit(g_preventEmptyFormSubmission);
var inp = $('input', form);
LiveSearch.attach(inp);
inp.focus();
var btn = $('<a></a>').attr('href', 'javascript:;');
btn.click(function () {
$(this).parent('form').submit().children('input').focus()
}).appendTo(form);
$('.home-featuredbox-links a').hover(
function () { $(this).next('var').addClass('active') },
function () { $(this).next('var').removeClass('active') }
).click(function () { g_trackEvent('Featured Box', 'Click', this.title) }
).each( function () { g_trackEvent('Featured Box', 'Impression', this.title) }
)
});