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

  • Home
  • SEARCH
  • 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 8584799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:51:25+00:00 2026-06-11T21:51:25+00:00

So I have a folder in my assets/javascripts folder that runs an image slideshow

  • 0

So I have a folder in my assets/javascripts folder that runs an image slideshow called galleryview. Inside this folder is a themes directory holding images for my “next” and “previous” buttons thus…

assets/javascripts/galleryview/themes/

now the javascript running this, links to these images via this….

//Determine path between current page and filmstrip images
//Scan script tags and look for path to GalleryView plugin
        $('script').each(function(i){
            var s = $(this);
            if(s.attr('src') && s.attr('src').match(/jquery\.galleryview/)){
                img_path = s.attr('src').split('jquery.galleryview')[0]+'themes/';
            }
        });

HOWEVER, I’m using this in a Rails app now, so I need to point this img_path line to

assets/images/

so what should my imag_path look like now?

img_path = ?

Here is the entire javascript file code on jsfiddle….copy and past this into an editor and
the area I’m interested in is around line 389.

http://jsfiddle.net/thefonso/Sqmxa/

  • 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-11T21:51:26+00:00Added an answer on June 11, 2026 at 9:51 pm

    Not sure this code will exactly work, but I think you can use the image_path helper to get you close. Something like:

    img_path = <%= image_path 'images/'%>;
    

    Put this inside a .js.erb file and the ERB shown above should be parsed and output the string "/assets/images/", assigning img_path to the value "/assets/themes/"

    Of course, you could also just do:

    img_path = "/assets/images/";
    

    …but the upside of using the helper, I guess, is in case that the “assets” path ever changes you won’t need to update a hard-coded string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this folder public/assets/dvd_files/dvds/ and i want to svn ignore anything that might
I have some videos in assets folder, I wish to view that videos in
Please help me with following problem. In my android assets folder I have xml
I have created application where i just need to access data form assets folder.
I want to delete a file in assets folder in run-time. I have a
I have folder home/admin. In this folder there is index.php. When i access to
InputStream myInput = myContext.getAssets().open(MyFolder/ + MyFile.db3); I have a file in the assets folder
I have published my site and I have this inside .htaccess: <IfModule mod_rewrite.c> RewriteEngine
I get the following error when I have coffeescript files in my assets/javascript folder
I have few html files in assets folder of my application. My application loads

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.