Skip to content
Advertisement

JS will not run past set style.zIndex

I am trying to set up button elements. There are 2 scripts to get each button type and either run a simple collapse menu, or run a complicated collapse where slides 1 div over another after shifting depths. Everything seems to work except the depth (zindex) switch, and when the depth switch is implemented it stops running anything past the depth switch. Here is the script in question.

JavaScript

Advertisement

Answer

You are trying use prevPage before it was populated. A simple check if it’s not empty should fix it:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement