Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

I just finished jQuery basics and I want to add pages to the canvas like a coloring book

I have selected pages and placed them at the top of the page. Right now their just img files however I want to be able to click on the photo and have it rotate 360 degrees scale to the size of the canvas and overlap the canvas while retaining the ability to draw on it and then go back to the original state once another page is selected. I know that I can do that through css by using transform and setting the opacity of the canvas so you can see the page behind the canvas so I can retain the ability to draw on it. However, if anyone has any tips or helpful advice for a newby please comment. below is my current game plan I am just starting but I hope it wont take too long to do.

//Problem: pages do not enlarge or overlap canvas
  //Solution: create onclick function that rotates, scales and re-positions picture while effecting the opacity. 
  //Then, goes back to original position once other page is selected.

  //When selected page is animated
    //rotates image
    // scales image
    //re-positions image
  //When other page is selected
    //returns image to original place and size
    // performs previous steps on new image

1 Answer

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

Hey Leonard Foster

There are probably a number of ways to tackle this problem. I think the main thing is to take a stab at it. Because at this stage of planning you don't know what problems you'll encounter.

Give it a go and see if there are any obstacles :)

Regards
Andrew