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 trialSean Pierce Sumler
18,968 PointsExpanding on the drawing application
Hi everyone. I've completed the "Creating A Simple Drawing Application" in the jQuery basics section. It was a lot of fun so I decided to expand on the project.
I successfully included a slider to change the width of the "brush"
Now I'm wondering if there is any way I can reformat this for mobile. It seems as though the mouse functions used in the jQuery script won't work for iOS or Android. I've searched this topic but I couldn't find anything that seemed relevant to this case.
I uploaded my code to codepen if anyone wants to take a look http://codepen.io/seanpierce/pen/yYpdOw
If anyone can help point me in the right direction I would really appreciate it. Thanks!
1 Answer
rydavim
18,814 PointsYour CodePen link doesn't seem to be working for me, so I'll try to give some general pointers that you can investigate.
I believe you could use the vmousedown
, vmouseup
, and vmousemove
events from jQuery Mobile. You can find documentation for those methods here. If you want to test this, you can get started quickly without having to download anything by using Google's CDN.
Let me know if you run into any snags, and I'll do my best to help work them out. Happy coding! :)
Sean Pierce Sumler
18,968 PointsSean Pierce Sumler
18,968 PointsThanks rydavim! I'll look at this right now. I'm not sure why the link doesn't work. Here is another one http://codepen.io/seanpierce/full/yYpdOw/
I appreciate your help!
rydavim
18,814 Pointsrydavim
18,814 PointsLooks like the CodePen links work if you take the

off the end.The touch addition looks like it's a bit more complicated than I originally thought. I've got to go to work, but I'll investigate more later today and get back to you.
rydavim
18,814 Pointsrydavim
18,814 PointsThere is a really informative article on Zipso working with a very similar example. I would highly recommend taking a look if you get stuck in your tinkering.
Happy coding! :)
Sean Pierce Sumler
18,968 PointsSean Pierce Sumler
18,968 PointsThanks for the Zispo article. I'll look at that right now. Again, I really appreciate it! -Sean