#.toggle
1 messages · Page 1 of 1 (latest)
Here
Why didn’t we just toggle the liked and retweeted class on the like and retweet icon, just like we did for reply ?
I should see the entirety of the code and i've done that a long time ago, but I am going to make a guess.
The toggle from the class list applies and removes the classname "hidden" this is done so that when the <div> containing the replies/comments of the tweet is shown or hidden. Essentially you are applying and removing a classname and css does the rest.
with the other two buttons you want to go into the the tweet object and:
- change the colour
targetTweetObj.isLiked. - change the counter of likes
targetTweetObj.likesaccordingly.
Hopfully I understood your question and you understand my answer 🙂