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

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