New wiki-page
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"> | <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"> | ||
RLQ.push(function () { | RLQ.push(function () { | ||
Line 32: | Line 13: | ||
}); | }); | ||
</script> | </script> | ||
Revision as of 18:56, 9 August 2017
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"> RLQ.push(function () { $('.clickable').bind('click', function (ev) {
var $div = $(ev.target); var $display = $div.find('.display'); var offset = $div.offset(); var x = ev.clientX - offset.left; var y = ev.clientY - offset.top; $display.text('x: ' + x + ', y: ' + y);
}); }); </script>