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

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?