开发者

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社区
  1. capture the link.
  2. wait for $.POST/AJAX request.
  3. go to the link


$('a').click(function(){
    $.ajax({
        url: '/analytics',
        type: 'post',
        data: {url: $(this).attr('href')},
        async: false
    });
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜