okfocus / okzoom

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

Avoid adding multiple loupe DIVs #15

Open reevapp opened 8 years ago

reevapp commented 8 years ago

The current version always add new "ok-loupe" and "ok-listener" divs, the following change will prevent this behavior and allow for the initializer to be called multiple times without creating unnecessary divs. The key is in looking for an already created Div by its id and having one div for each image that supports zooming.

This solves issue #10.