jQuery capture href (heatmap/usability)
I want to create a heatmap from mousedown event, but before this i need to capture the A element on a website. Does anyone know how i could achieve this?
in short: if i click a link it should be doing the following:
-
开发者_StackOverflow社区
- capture the link.
- wait for $.POST/AJAX request.
- go to the link
$('a').click(function(){
$.ajax({
url: '/analytics',
type: 'post',
data: {url: $(this).attr('href')},
async: false
});
}
精彩评论