1) Are you having this problem in development or production?

2) Where did you put the jquery.backstretch.js file

3) you probably don't want to load that file from your layout, you probably 
want to load the application.js as instructed by the Gem instructions

4) did you read the Asset Pipeline Guide and make sure you have a solid 
understand of how it works? You appear to not be following the basic guidelines 
outlined in http://guides.rubyonrails.org/asset_pipeline.html

5) Also I think if you're not targeting below IE 9 you can use the 
background-size: 100% css property to do what that jQuery plugin does without 
any javascript at all. 



> On Jan 1, 2015, at 12:38 PM, David Williams <[email protected]> wrote:
> 
> I tried to call the js file using <%= javascript_include_tag 
> "jquery.backstretch" %> But, still it doesn't fire off.
> 
> <script type="text/javascript">
>    $.backstretch([
>        "http://dl.dropbox.com/u/515046/www/outside.jpg";
>        , "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg";
>        , "http://dl.dropbox.com/u/515046/www/cheers.jpg";
>    ], {duration: 3000, fade: 750});
> </script>

----

Jason Fleetwood-Boldt
[email protected]
http://www.jasonfleetwoodboldt.com/writing

All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned 
into blog posts (original poster information will be made anonymous). Email 
[email protected] with questions/concerns about this.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/7D760CE2-F537-4281-B711-96F2573B9053%40datatravels.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to