Unobtrusive Toggling failing in Rails

Posted by sscirrus on Stack Overflow See other posts from Stack Overflow or by sscirrus
Published on 2010-05-30T06:00:32Z Indexed on 2010/05/30 6:02 UTC
Read the original article Hit count: 344

I've been at this for hours but it just isn't working. I'm trying to get ToggleJS working using Scriptaculous' Effects library. Specifically, the example: http://wiseheartdesign.com/page_attachments/0000/0075/demo.html.

I got it working beautifully using a pure html file called new.html. I then converted it to new.html.erb so I can incorporate some of the animations into my Rails project and it stopped working!

I tried both html and ruby javascript tags but neither are working, for example:

<%= javascript_include_tag "application", "prototype", "effects", "lowpro", "toggle" %>

The page's body is displaying on the browser, but without animations. I have made sure my javascript files are the same as the demo (plus, the html file is working with them anyway). Do you know where the problem might lie here with my .erb file?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about ruby-on-rails