I have a list of items in my html which is rendered via hardcoded json data from the
itemController. There are two buttons i.e., Previous and Next.
Initially, when the page is loaded the active state i.e., blue highlighted box is marked at
item1. Thats fine as its one of the 1st need.
The 2nd need is that as I click Next button the active state should jump from
item2 and so on till the active state reaches the end of the list i.e,
item5, after further Next button clicks and Next button should be disabled till active state reaches
Similarly, as I click Previous button the active state should jump from item5 to item4 and so on till the active state reaches top of the list i.e, item1, after further Previous button clicks and Previous button should be disabled till active state reaches item1 and Next button enabled.
I am not able to solve this 2nd need since long time.