0

I am using some widget to show spotlight on image, this is link to plugin

https://github.com/emn178/jquery-animations-spotlight

Only problem I have is that spotlight is moving all around, is it possible to make it just on hover to stay i the middle of the picture?

Here is code and working fiddle

$('#image').animate('spotlight');

https://jsfiddle.net/jL8u1me0/

And demo page of spotlight

http://emn178.github.io/jquery-animations-spotlight/samples/spotlight/

Miomir Dancevic
  • 6,726
  • 15
  • 74
  • 142
  • You could add an `mouseover, mouseout` event binding for the `element` into the `$.animations['spotlight']` function and snap the radius `(x,y)` of spotlight to `(width/2,height/2)`. Make sure you are writing the whole thing inside the event handler for `mouseover, mouseout`. – Krishnakumar_Muraleedharan Jul 08 '16 at 08:04
  • nice, can you make and working fiddle and asnwer? – Miomir Dancevic Jul 08 '16 at 08:17

0 Answers0