Skip to content

Instantly share code, notes, and snippets.

@kosinix
Created December 29, 2013 08:01
Show Gist options
  • Select an option

  • Save kosinix/8168479 to your computer and use it in GitHub Desktop.

Select an option

Save kosinix/8168479 to your computer and use it in GitHub Desktop.
Jquery get element x and y position on screen
$('body').on('click', 'a', function(e){
$(this).offset().left; // x
$(this).offset().top; // y
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment