Solomon Sam
Solomon Sam

Reputation: 268

undo / go back in history with jQuery

I'm working on a customizations website completely on jQuery (I'm completely new to coding and because that's the only coding I know as of now). Here is the link to the project I'm working on for a friend here is the link to it. I want to get the undo button that's on the top right corner to work.

The user clicks on color, then clicks on the bag part and that areas color changes. The undo button should undo the current color applied and return to the previous color step by step.

I'm also stuck at creating a summary for the colors present on the bag part it just shows all the colors I have selected rather than the colors that's present on the bag.

It would be a great help if some one could help me out with this 2 things. I have been researching an developing this for the past 3 months.

Upvotes: 1

Views: 356

Answers (1)

locrizak
locrizak

Reputation: 12281

Well since you are not changing the url you cannot use the browsers go back or history functionality. What I suggest is keep an array the has all of the possible values in an object. That way if you want to go back you can do something like arr.length-1 to get the previous set of settings.

Upvotes: 1

Related Questions