Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8558141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:44:30+00:00 2026-06-11T15:44:30+00:00

I have the following js in my assets/javascript jQuery -> if $(‘.pagination’).length $(window).scroll ->

  • 0

I have the following js in my assets/javascript

jQuery ->
  if $('.pagination').length
    $(window).scroll ->
      url = $('.pagination .next_page').attr('href')
      if url && $(window).scrollTop() > $(document).height() - $(window).height() - 50
        $('.pagination').html('<img src="images/spinner.gif" />')
        $.getScript(url)
    $(window).scroll()

Here I am calling for a spinner animation, but is not fetched on localhost.

No route matches [GET] "/images/spinner.gif"

I have already ran

rake assets:precompile:all RAILS_ENV=development

and my image is properly placed in assets/images (and in public) So this makes me think that the way I call for this image must be wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:44:31+00:00Added an answer on June 11, 2026 at 3:44 pm

    First of all have a read at rails asset pipeline and read difference between developement and production way of serving assets this will help you understand how the assets are served

    If you add an erb extension to a JavaScript asset, making it something such as application.js.erb, then you can use the asset_path helper in your JavaScript code:

       jQuery ->
      if $('.pagination').length
        $(window).scroll ->
          url = $('.pagination .next_page').attr('href')
          if url && $(window).scrollTop() > $(document).height() - $(window).height() - 50
            $('.pagination').html('<%= asset_path('logo.png') %>')
            $.getScript(url)
        $(window).scroll()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have the following Jquery calling a Javascript method $j(a.Pinterest).attr(href, javascript:void(addScript());); And this
i have the following javascript in my view: $.ajax({ url:<?php echo site_url('switches/showknownvlans/'.$ip.'/'.$hardwaremodel);?>, type:'POST', dataType:'json',
Please help me with following problem. In my android assets folder I have xml
I have the following code that isn't working in IE, any thoughts? <script type=text/javascript
I have the following javascript and JsonResult. The issue I am having is the
I have the following models: Asset and User Assets belongsTo User User hasMany Assets
I currently have the following code: RewriteCond %{REQUEST_URI} !assets/ RewriteCond %{REQUEST_URI} !uploads/ RewriteRule ^([a-z|0-9_&;=-]+)/([a-z|0-9_&;=-]+)
I have the following in web layout (master page): @(Html.Telerik().ScriptRegistrar() .DefaultGroup(group => group .DefaultPath(~/Assets/telerikaspnetmvc/2011.2.712/Scripts/)
I have the following XML <plist version=1.0> <dict> <key>items</key> <array> <dict> <key>assets</key> <array> <dict>
I have the following simple jquery get statement that calls a WebApi on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.