JoséVázquez Posted August 28, 2020 Share Posted August 28, 2020 Hi, I would like to create multiple to do lists and add the ability to strike out text when clicked on a li element. I'm using the code of this lesson: https://www.w3schools.com/howto/howto_js_todolist.asp. The problem is that if I add another list and click on a li element, it does not strike out text. It strikes out text only from the first list. How can I do that so it works in multiple lists? Thanks in advance. Link to comment Share on other sites More sharing options...
JMRKER Posted September 1, 2020 Share Posted September 1, 2020 How did you modify the code in the link to create the second 'to-do' list? My guess is that the event to strike out the text is using a reference to the 1st list, not the second. Need to see your code Link to comment Share on other sites More sharing options...
ishan_shah Posted November 2, 2020 Share Posted November 2, 2020 Its should be working fine ,please recheck you have targeted right ID everytime,if this doesn't solve your problem please provide your code so other's can take a look and find what's wrong. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now