Hi Docentz:
The code you posted above has at least one bug. $w(‘indexPositions’) should be $w(‘#indexPositions’) assuming that is the correct element name.
Also so without seeing your page it’s hard to understand what you are trying to achieve and assess other possible bugs.
If you post the url for the page you are having problems with then It will be easier to give more specific help.
Steve