I'm looking for a solution to animate a horizontal gallery (div) based on cursor's proximity to the left or right of the window. The center of the window will do nothing, but as you begin to creep left, the gallery slides right, and visa versa. Very common thing to do, but I want to accomplish this with javascript/jquery. If someone could just get me on the right track I would appreciate it.
Asked
Active
Viewed 3,160 times
1
-
Probably a good post to go in freelancer.com – Kasturi May 26 '11 at 21:45
2 Answers
2
(Edit) For a newer and improved example go to this SO question:
Horizontal scroll on mouseMove - wide div in smaller div with overflow:hidden (Can't get the math to work)
I created a mousemove gallery.
Hope this will help.
JSFIDDLE DEMO: MOUSEMOVE GALLERY
Just set into the css the desired width and height of the gallery container.
Fill the gallery with images and enjoy! :)
The code is simplyfied and commented to help anyone upgrade it.

Community
- 1
- 1

Roko C. Buljan
- 196,159
- 39
- 305
- 313
-
@Ludovic Thanks. Please follow this one: http://stackoverflow.com/questions/16050564/horizontal-scroll-on-mousemove-wide-div-in-smaller-div-with-overflowhidden-c – Roko C. Buljan Oct 15 '13 at 14:06
-1
bunch of examples and plugins;
http://www.dynamicwp.net/articles-and-tutorials/top-20-jquery-slideshow-and-image-gallery-tutorials/

tugberk
- 57,477
- 67
- 243
- 335