<style>
.sj-popman-obj-previewer { border:1px solid lightslategray; border-radius:8px; }
.preview { background:slategray; color:white; font-size:20px; }
</style>
<script>
popman.setup({modeTest:true, modeAnimation:true, alertExp:'50%', confirmExp:'80%'}).detect();
var lastTargetId = null;
window.addEventListener('mousemove', function(event){
var target = event.target;
var statusOn = (target && target.tagName.toUpperCase() == 'BUTTON');
var statusSame = (statusOn && target.id == lastTargetId);
lastTargetId = (statusOn) ? target.id : null;
if (statusOn){
(statusSame) ? popman.movePreviewer(event, 30, 35) : popman.startPreviewer(event, 30, 35, ('[Preview Test] ' + lastTargetId), 'preview');
}else{
popman.stopPreviewer();
}
});
</script>
<body>
<button id="preview-test-1" onclick="popman.alert('Hello there?');">Hello</button>
<button id="preview-test-2" onclick="popman.alert('You already get power!');">Get power</button>
<button id="preview-test-3" onclick="popman.confirm('Did you get some money?');">Get money</button>
</body>