Skip to content

Instantly share code, notes, and snippets.

WRCustomDialog = actuate.Class.create();
WRCustomDialog.prototype = actuate.Class.extend(new WRCommonBaseDialog(), {
isResizable : false,
_title : 'Tree Map Dialog',
minWidth : 400,
minHeight : 200,
_defaultWidth : 400,
_defaultHeight : 200,
initialize : function () {
this.hasCancelButton = false;
<a href="#" style="background-color: lightblue;" onclick="alert($(this).position().left + $(this).height() + ',' + $(this).width());">Click Me</a>
$(document).click(function(e) {
$('<div/>', {
'id':'myDiv',
'class':'myClass',
'text':'Text Only'
}).appendTo('body')
.css({
'position': 'absolute',
'left': e.pageX,
'top': e.pageY
<a href="javascript:if(document.cookie.indexOf('isLoaded=true')!=-1){$.getScript('http://localhost:63342/MouseClick/src/js/xyDiv.js', function(){});loaded++;document.cookie='isLoaded=true';}">test</a>
@krisclarkdev
krisclarkdev / dynamicDivXY.js
Last active October 17, 2016 15:37
Example showing how to get the X&Y from a mouse click and place a DIV at that location
var dynamicDivIDs = new Array();
function random() {
return Math.floor(Math.random() * 10000) + 1;
}
function newDivID() {
var newIDPrefix = 'dynamicDiv';
var newID = newIDPrefix + random();