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

Quillor Studio
Quillor Studio
7,658 Points

jQuery Validation

Hi,

I have been working on this project in jQuery: http://quillor.com/clients/noscope/vault/2.0 Select a key and open the vault to test it out. Here is my jQuery file: http://quillor.com/clients/noscope/vault/2.0/js/app.js

Here is my problem:

  1. After the user opens the vault, they are still able to select a key and change the color of the raffle ticket. How do I create a condition to stop this? I would like the user to only be able to select a key if the vault is closed

2.After a user opens the vault, they can press "Play again" to reset it. If the user open it a second time, the raffle prize is gone. What do I need to code so that it shows up every time the vault is reopened.

Thank you so much!

Tim