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

Bruce Canedy
Bruce Canedy
13,496 Points

Implemetation of jquery.hoverdir.min.js

I am attempting to implement hoverdir jquery in Rails. I am able to run this Jquery if I open the html directly in my browser (not through rails), but when I attempt to run in rails nothing happens. From the investigation I've done so far I feel like it something to-do with sequence of jquery's.

Currently in my application.html.erb file I have implemented the following.

<%= javascript_include_tag "libs/modernizr.min.js" %>
<script src="<%= asset_path( 'libs/jquery.min.js') %>"></script>
<script src="<%= asset_path( 'libs/jquery.ui.map.min.js') %>"></script>
<%= javascript_include_tag  "application.js" %>
<script src="<%= asset_path( 'libs/jquery.fancybox.min.js') %>"></script>
<script src="<%= asset_path( 'libs/jquery.hoverdir.min.js') %>"></script>
<script src="<%= asset_path( 'libs/jquery.isotope.min.js') %>"></script>
<script src="<%= asset_path( 'libs/jquery.masonry.min.js') %>"></script>
<script src="<%= asset_path( 'libs/jquery.fitvids.min.js') %>"></script>
<script src="<%= asset_path( 'libs/jquery.flexslider.min.js') %>"></script>
<script src="<%= asset_path( 'script.js') %>"></script>

all java files are located in my javascript > libs > all files others are located directly in javascript root directory.

2 Answers

Have you tried viewing page source to see if the included scripts are referenced correctly?

Bruce Canedy
Bruce Canedy
13,496 Points

Yes. I can see that rails asset routing is working correctly. When I view the source I can see all the javascript files I have placed under app > assets > javascripts directory. I feel like there is a conflict with the javascript files, but I can't isolate the issue.