User:Michaelabril/timeless.js

$( document ).ready( function {

previousLanguage = $.cookie('previousLanguage');

// If no anchor name, use cookie var hash = $(location).attr('hash').substr(1); if (hash == '') { if (previousLanguage!='' && document.getElementById(previousLanguage)) { document.getElementById(previousLanguage).scrollIntoView; }		}	// If using an anchor name, overwrite the cookie else if (previousLanguage != hash) { $.cookie('previousLanguage', hash, { expires: 2 }); }	} );