Skip to content

Instantly share code, notes, and snippets.

@lequinharay
Created August 12, 2013 05:13
Show Gist options
  • Select an option

  • Save lequinharay/6208372 to your computer and use it in GitHub Desktop.

Select an option

Save lequinharay/6208372 to your computer and use it in GitHub Desktop.
クリックした場所の座標を取得してコンソールで表示するjs。 クリッカブル・マップとかの設定のために使う
$(document).on(
'click', 'html', function(e) {
var x = e.pageX;
var y = e.pageY;
alert('X = ' + x + 'px, Y = ' + y + 'px');
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment