I successfully got the JS functioning on the index page with the url
provided in the example for the gem. But, the javascript didn't run for
images in my assets folder and it stopped working when I refreshed the
page using the array to add multiple images. I'm using
https://github.com/socialreferral/backstretch-rails
application.js
//= require 'jquery.backstretch'
Here's just a layout of my code
<body>
--Underneath final <Div> --
<script type="text/javascript" src="jquery.backstretch"></script> <=
fires off ActionController::RoutingError (No route matches [GET]
"/jquery.backstretch.js"):
<script>
$(document).ready(function() {
$.backstretch([
"<%= image_tag '1.png' %>"
, "<%= image_tag '2.png' %>"
, "<%= image_tag '3.png' %>"
], {duration: 3000, fade: 750});
});
</script>
</body>
Disclaimer: The console does show Backstretch being loaded. But, the
background only changed once, and that was with the url provided on
their demo.
If you can try to duplicate the problem with a test app. That might give
me a clue and lead to a real solution. Thank you.
--
Posted via
http://www.ruby-forum.com/.