jaukia / zoomooz

An easy-to-use jQuery plugin for making zooming web pages.
http://janne.aukia.com/zoomooz/
1.79k stars 275 forks source link

Problemm selecting next object to zoom #117

Open ckaaalux opened 8 years ago

ckaaalux commented 8 years ago

I use setup like example "rootchange", but with created div elements after page load (user creates interactive). All get "zoomTarget" in their class, as iun the example. Only div's created at page load (also with zoomTarget in their class) are zoom-ed.

In the jquery.zoomooz-zoomButton.js (part of jquery.zoomooz.js): _getNext() shows all elements via console.log(listData.toSource()) (in FF), but loops only through first elements which are already defined / available when page loads. In a way the index var becomes 0 so _getNext() returns null via else part of the if as it must select the first dynamically created div (with its contents to be zoomed).

How can / why does this happen?

Or do I have to "reload" the listData array somewhere else?

When I use the js library with your example html page it works fine: all divs are selected / zoomed when clicking the next / prev buttons.