« Back to the index

Core zIndex example

The zIndex method is used as a unique counter to assign a unique zIndex to the divisions:

Let's put zIndex on some rectangles:
function test1() { WA.get('#d3').node().style.zIndex = WA.getNextZIndex(); WA.get('#d2').node().style.zIndex = WA.getNextZIndex(); WA.get('#d1').node().style.zIndex = WA.getNextZIndex(); } function test2() { WA.get('#d1').node().style.zIndex = WA.getNextZIndex(); WA.get('#d2').node().style.zIndex = WA.getNextZIndex(); WA.get('#d3').node().style.zIndex = WA.getNextZIndex(); }
red, green, blue blue, green, red
« Back to the index