More specifically a client has asked that when their link on another site has been clicked, and the user is brought back to the clients site. Can the href value of the users clicked link be saved and used again in another function.
For ex. I clicked the clients logo on another site and it brought to the clients site. Now the content on the clients site is filtered based on where i came from.
I found the following which saves the href of a clicked link on current site.
$(document).ready(function(){
$('a').click(function() {
if ($(this).attr('href')) someFunction.href = $(this).attr('href');
});
});
function someFunction(a) {
window.setTimeout("console.log(someFunction.href);",200);
But im not sure how to store that data and use it again.