tags:

views:

83

answers:

2

I think it has been a while but I think I remember seeing a javascript feature where the whole screen is black and where you mouse is it shows what is under the black. Anyone have an idea of how to do this or what I am talking about?

A: 

This is more case of a CSS change on mouse over in javascript. Try this example if this suits you

GustlyWind
I don't think this is what OP wants.
rahul
+2  A: 

You can have a look at the source of the page and it is not too difficult to understand. What they are doing is setting a background image for the body tag and then adjusting the background position on mousemove using the x and y mouse co-ordinates.

Note

They are using jQuery to do this. You can do this without using a js library also.

rahul
The 2nd example at http://home.comcast.net/~jscheuer1/side/flashlight/ does something different too.
Crescent Fresh
And what would be the reason for the down vote?
rahul
@adamantium, I don't know what happened. I `-1` the other answer, not yours. It was great, but now it won't let me change it. Can you edit so I can change my vote?
Doug Neiner
@dcneiner edited my answer.
rahul
Thanks! I am so glad you said something! I promise I clicked on the other answer :) Blame the JS... +1 for great answer
Doug Neiner
It wasn't a blame, just curious about the reason for the down vote.:-)
rahul