Skip to content

Instantly share code, notes, and snippets.

@bitmorse
Created February 14, 2013 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitmorse/4952575 to your computer and use it in GitHub Desktop.
Save bitmorse/4952575 to your computer and use it in GitHub Desktop.
$(".result a").click(function(){
hrefa = $(this).closest('.result').children('a').context.href;
dsid = $(this).closest('.result').attr('rel');
resc = ''; //set this to the result count
$.ajax({
async: false,
type: "POST",
url: "/ajax/logQueryResultClick", //dynamic url to logging action
data: {
dsid: dsid,
hrefa: hrefa,
resc: resc
},
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
cache: false
});
return true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment