javascript - Change colour of elements previously clicked -
I have a list of elements, which I want to change color after clicking on the user's button (then a different Clicked). I know how to change the color of the button on click, I will use the For example, the user clicks the Titanic nothing happen. Then the user changes color to Titanic 7, Titanic and saves that color. After that user clicks the Titanic 9 Both the Titanic and Titanic 7 have given the "visit" color. See JSFiddle If I understand you correctly, I do: onclick , but how will I change the color of the button after I click?
$ ('. Song'). Click (function (e) {e.preventDefault (); $ ('Selectnext'). CSS ('background-color', 'blue'). RemoveClass ('select'); $ (this) .addClass (' Selectnext ');});
Comments
Post a Comment