okfocus / okzoom

Zoom.
http://okfoc.us/okzoom
MIT License
230 stars 27 forks source link

Does not work on Popup #7

Closed figureslibres closed 9 years ago

figureslibres commented 9 years ago

Hi

Okzoom works fine on pages but when opening an image in lightbox, it does not work ! http://bit.ly/1CYOslT

I have on $('#sk-lightbox-image img') but without success

Any help would be appreciated

julescarbon commented 9 years ago

well your first problem is saying $(document).onload(function(){ should just be "load"

julescarbon commented 9 years ago

with lightboxes that might change I usually keep the last mousemove event around so when the lightbox opens i can call

var okzoom = $whatever.data("okzoom")
okzoom.build()
okzoom.mousemove(last_mouse_event)

and have the loupe update image/position correctly. likewise when closing the lightbox you should call

okzoom.mouseout(okzoom, last_mouse_event)

so the loupe goes away up to you to tie this into whatever lightbox plugin you're using.. hope this helps tho

figureslibres commented 9 years ago

Hi

Thanks for you reply. It is to hard for me as I am not a coder

Regards Greg Berthelot