Jan 07
Wednesday

jwCompactor Demo

As you can see this is a demo of the jwCompactor module which allows you to place several modules into a single position. The modules are packed together using jQuery and Anicollapse. So instead of a chunky collapse animation, there is a smooth transitional animation to hide unused modules.
As you can see this is a demo of the jwCompactor module which allows you to place several modules into a single position. The modules are packed together using jQuery and Anicollapse. So instead of a chunky collapse animation, there is a smooth transitional animation to hide unused modules.
Detecting Mouse Click Location
Written by Adam McHugh   
Wednesday, 17 September 2008 13:23

Ever wanted to know how to detect the location of a mouse click? Here is a simple little function that once activated will allow you to record the mouseclick location on your page.

 

By adding the following:

<script>

function printEvent(e) {
if (navigator.appName == "Microsoft Internet Explorer"){
mX = event.clientX;
mY = event.clientY;
}
else {
mX = e.pageX;
mY = e.pageY;
}
alert("Click at x = " + mX + " and y = " + mY);
}

</script>

You will get an alert each time the users mouse clicks on the screen. Obviousy this would be handy for non-scrolling websites as it only returns the x,y location on the screen and not the content of the website.