Rotating Tabs - (Problem x 2)

Rotating Tabs - (Problem x 2)

I have a set of continuously rotating tabs which I would like to stop rotating after it has made its way through one complete cycle.

I have seen code which is supposed to work, but does not with the version of the UI I am currently using (1.5.3)...

When I tried to update the UI version to the latest, my tabs no longer worked (they displayed the same but did not rotate and were not selectable.

Any ideas? Thanks in advance.