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.

Ruby Build a Simple Ruby on Rails Application Frontend Development Adding Interactivity

Wagner Melo
Wagner Melo
307 Points

Javascript not working

The javascript code is not applying to my application. I tried everything possible, including changing the coffee framework for the pure js, but it's not working. Should I enable the JS in anywhere? Or it should be automatic?

2 Answers

Wagner Melo
Wagner Melo
307 Points

Problem resolved.

The problem was that the indentation really matters on coffe script.

Thank you all.

The code was wrote correct but the indentation no.

If you're keen to use javascript for the hover affect, maybe check out the page source. Take a look to see if the javascript files make it as far as the output to the browser. If they're not, you're issue lies within the inclusion of the files. If they are included within the page source, then it sounds like a javascript bug (so check your syntax) or maybe you havne't included something like jquery?