Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML jQuery Basics (2014) Creating a Simple Drawing Application Preparation

Drawing application

how can i add an eraser to this application ? every time i draw i have to reload to erase the application. and also how can i add function that get rid of colors that i dont need without reloading the webpage?


1 Answer

Well, I can try to get you started with some ideas.

For the erase part, do you simply want to have a button that clears the whole drawing? Or have an eraser where you're erasing part of your drawing?

There's probably a few ways you can approach deleting the colors. Either have a delete button which when clicked would delete the currently selected color. Or all the colors could have an "X" near them which would delete the corresponding color. Or possibly only the selected color would have an "X" next to it and it would delete that color.

See what you can get started with and post any more questions or problems you're having.